Chapter 10. Data Queries
Field
Description
query >output_delimeter
Enter the one character delimiter that will be used to separate output values.
This is only used when you "query" the script in which case it outputs
'index(delimiter)value'.
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 script query are to be sorted numerically (ie.
1,2,3,10,20,31)
alphabetic
: The indexes in this script 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 script query must be defined under this tag.
query >fields >dskDevice
Each defined field in the script 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 >dskDevice >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 >dskDevice
input
: Input values are the "known" values that you will use to derive the
>direction
output values, this is where the "query" part of script query comes in. When
you create a graph based on a script 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. A script query may return multiple statistics for a single index. For
instance, a single partition could return free disk space, total disk space, frag
mentation percentage, 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 >dskDevice
Enter the name that Cacti must use when asking the script for information
>query_name
about this field. For instance, the following should return values:
'(script_name) query (query_name)'.
20
<
New Page 1
Php Mysql Web Hosting