Chapter 10. Data Queries
Field
Description
query >fields >ifIndex >direction
input
: Input values are the "known" values that you will use to derive the
output values, this is where the "query" part of SNMP query comes in.
When you create a graph based on an SNMP query, Cacti will prompt you
to choose the input value to base the graph on.
output
: Output values are "unknown" values that are returned from the
script. An SNMP query may return multiple statistics for a single index. For
instance, a single interface could return bytes/sec in, errors, packets/sec, etc.
A rule of thumb is that input fields contain semi static data that is not graph 
able, while the output fields contain the data that will be graphed.
query >fields >ifIndex >oid
You must specify the actual OID that corresponds with the field. Each value
for this field can be obtained by doing an snmpget on 'oid.(each)snmpindex'.
10.3. Script Query XML Syntax
<
query
>
<
name
>
Get Unix Mounted Partitions
<
/name
>
<
description
>
Queries a list of mounted partitions on a unix based host with the 'df' command.
<
/description
>
<
script_path
>
perl |path_cacti|/scripts/query_unix_partitions.pl
<
/script_path
>
<
arg_index
>
index
<
/arg_index
>
<
arg_query
>
query
<
/arg_query
>
<
arg_get
>
get
<
/arg_get
>
<
arg_num_indexes
>
num_indexes
<
/arg_num_indexes
>
<
output_delimeter
>
:
<
/output_delimeter
>
<
index_order
>
dskDevice:dskMount
<
/index_order
>
<
index_order_type
>
alphabetic
<
/index_order_type
>
<
index_title_format
>
|chosen_order_field|
<
/index_title_format
>
<
fields
>
<
dskDevice
>
<
name
>
Device Name
<
/name
>
<
direction
>
input
<
/direction
>
<
query_name
>
device
<
/query_name
>
<
/dskDevice
>
<
/fields
>
<
/query
>
Table 10 4. Script Query XML Field Reference
Field
Description
query >name
(Optional) You can enter a "friendly name" for the script query here. It will
not be used by Cacti, and is for identification only.
query >description
(Optional) You can enter a description for the script query here. It will not be
used by Cacti, and is for identification only.
query >script_path
Enter the complete path to the script or executable that is going to handle
your script query. When in doubt, specify the pull path to all binaries
referenced in this path, the query may not execute otherwise.
query >arg_index
Enter the argument that is to be passed to the script to retrieve a list of
indexes.
query >arg_query
Enter the argument that is to be passed to the script to retrieve a list of values
given a field name.
query >arg_get
Enter the argument that is to be passed to the script to retrieve a single value
given a field name and index value.
query >arg_num_indexes
Enter the argument that is to be passed to the script to determine the total
number of available indexes. If specified, this will be used to determine when
to automatically recache this script query when it is attached to a device.
19
<





New Page 1








Home : About Us : Network : Services : Support : FAQ : Control Panel : Order Online : Sitemap : Contact : Terms Of Service

 

Our web partners:  Jsp Web Hosting  Unlimited Web Hosting  Cheapest Web Hosting  Java Web Hosting  Web Templates  Best Web Templates  Web Design Templates  Interland Web Hosting  Cheap Web Hosting  Filemaker Web Hosting  Tomcat Web Hosting  Quality Web Hosting  Best Web Hosting  Mac Web Hosting

 
 

Virtualwebstudio. Business web hosting division of Vision Web Hosting Inc. All rights reserved

Php Mysql Web Hosting