Chapter 10. Data Queries
Field
Description
query >oid_num_indexes
An OID that can be queried to determine the total number of available
indexes. If specified, this will be used to determine when to automatically
recache this SNMP query when it is attached to a device.
query >index_order
As of version 0.8.6, Cacti will attempt to find the best field to index off of
based on whether each row in the query is unique and non null. If specified,
Cacti will perform this check on the fields listed here in the order specified.
Only input fields can be specified and multiple fields should be delimited
with a comma.
query >index_order_type
For sorting purposes, specify whether the index is numeric or alphanumeric.
numeric
: The indexes in this SNMP query are to be sorted numerically (ie.
1,2,3,10,20,31)
alphabetic
: The indexes in this SNMP query are to be sorted alphabetically
(1,10,2,20,3,31).
query >index_title_format
Specify the title format to use when representing an index to the user. Any
input field name can be used as a variable if enclosed in pipes (|). The
variable
|chosen_order_field|
will be substituted with the field chosen
by Cacti to index off of (see index_order above).
query >fields
Each field contained within the SNMP query must be defined under this tag.
query >fields >ifIndex
Each defined field in the SNMP query must have a unique name given to it.
Do not use spaces or any non alphanumeric characters, this name must be
identifiable within Cacti.
query >fields >ifIndex >name
Here you can specify a "friendly name" for the field. This name will be used
by Cacti to help the user identify this field.
query >fields >ifIndex >method
Tell Cacti how you want it to gather SNMP information for this field.
get
: The 'get' method obtains a list of indexes and does an snmpget for each
index of the OID specified for this field.
walk
: The 'walk' method does a walk of the OID specified for this field. Both
methods will return the same values, even though the 'walk' method is typi
cally more efficient.
query >fields >ifIndex >source
When Cacti obtains a list for this field, you need to tell it how to derive its
value for each row.
value
: The 'value' option simply returns the result of the snmpget for each
row.
OID/REGEXP:(regexp_match)
: The 'OID/REGEXP:(regexp_match)' can
be used when you need to use a POSIX based regular expression to derive
the value from the OID. The most common example of this is to retreive the
IP address of an interface, and can be seen in the 'interface.xml' file.
VALUE/REGEXP:(regexp_match)
: The 'OID/REGEXP:(regexp_match)'
option can be used to parse the value based on a regular expression, return
ing the first match.
index
: Simply use the value of the index for this row as the value. If the in
dex is being parsed from the OID using the oid_index_parse field, you must
specify
index
here.
18
<
New Page 1
Php Mysql Web Hosting