|
From: Rocky Z. <cho...@gm...> - 2007-05-31 04:25:26
|
Recently I want to custom the Cacti to monitor the processes number of the
server, for example: httpd/mysqld, etc.
So I wrote a XML file, cacti/resource/snmp_queries/processes.xml:
<interface>
<name>Get Important Processes Number</name>
<oid_index>.1.3.6.1.4.1.2021.2.1.1</oid_index>
<index_order>prNames:prMin:prMax:prCount:prErrorFlag:prErrMessage</index_order>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<prIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.2021.2.1.1</oid>
</prIndex>
<prNames>
<name>Names</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.2021.2.1.2</oid>
</prNames>
<prMin>
<name>Min</name>
<method>walk</method>
<source>value</source>
<direction>input</source>
<oid>.1.3.6.1.4.1.2021.2.1.3</oid>
</prMin>
<prMax>
<name>Max</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.2021.2.1.4</oid>
</prMax>
<prCount>
<name>Count</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2021.2.1.5</oid>
</prCount>
<!--<prErrorFlag>
<name>ErrorFlag</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2021.2.1.100</oid>
</prErrorFlag>
<prErrMessage>
<name>ErrorMessage</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2021.2.1.101</oid>
</prErrMessage>-->
</fields>
</interface>
Then I created the Data Queries, Data Input Method is "Get SNMP Data
(Indexed)", and *"**Successfully located XML file"*
But When I Associate the Data Queries to Graph Template, I get this Errors:
Data Template - SNMP - Important Processes
*Data Source:* httpd
*Warning*: Variable passed to each() is not an array or object in *
/data/httpd/monitor/cacti/data_queries.php* on line *356*
Now of course I can't create such graph, so what is the problem?
Thanks.
apache-2.2.3
php-5.2.0
mysql-4.1.22
net-snmp-5.1.2
rrdtool-1.2.23
cacti-0.8.6j
|