http://forums.cacti.net/viewtopic.php?f=21&t=43860
I am using Cacti 0.8.8a , on CentOS6.4
Here is my xml
Code: Select all
<interface>
<name>Get IPRS Statistics</name>
<description>Queries for Kemp IPRS statistics</description>
<oid_index>.1.3.6.1.4.1.12196.12.2.1.1</oid_index>
<index_order>iprsDesc</index_order>
<oid_index_parse>OID/REGEXP:.*\.([0-9]*)$</oid_index_parse>
<fields>
<iprsIndex>
<name>Index</name>
<method>walk</method>
<source>index</source>
<direction>input</direction>
</iprsIndex>
<iprsDesc>
<name>Description</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.12196.12.2.1.11</oid>
</iprsDesc>
<iprsBytesOut>
<name>Bytes out</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.12196.12.2.1.16</oid>
</iprsBytesOut>
</fields>
</interface>
but I changed source:value to source: input as that seemed to be suggested here http://www.cacti.net/downloads/docs/htm ... y_xml.html , and added a Method: walk , as while during debug that seemed to be an error.<iprsIndex>
<name>Index</name>
<source>value</source>
<direction>index</direction>
</iprsIndex>
1. I create a new data query
2. Create new deviceName: kemp
Description: kemp
XML Path: <path_cacti>/resource/snmp_queries/kemp2.xml
Data Input Method: Get SNMP Data (Indexed)
Get: "Successfully located XML file:
Downed device Detection: SNMP Uptime
SNMP Version: 2
SNMP Community: public
SNMP Port: 161
SNMP Timeout: 5000
Max OID per get request: 10
Upon save, device is created, and successfully SNMP polled (shows SNMP Information on device screen)
3. Add Data Query to device
... Looks Great so farStatus: Success (184 items, 92 Rows)
Verbose Query: (truncated, not showing all 92 rows )
+ Running data query [24].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/kemp2.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.12196.12.2.1.1' Index Count: 92
+ Index found at OID: '1.3.6.1.4.1.12196.12.2.1.1.1' value: '0'
+ Index found at OID: '1.3.6.1.4.1.12196.12.2.1.1.2' value: '0'
+ Index found at OID: '1.3.6.1.4.1.12196.12.2.1.1.3' value: '1'
+ Index found at OID: '1.3.6.1.4.1.12196.12.2.1.1.5' value: '2'
...
+ Index found at OID: '1.3.6.1.4.1.12196.12.2.1.1.91' value: '10'
+ Index found at OID: '1.3.6.1.4.1.12196.12.2.1.1.92' value: '10'
+ index_parse at OID: '1.3.6.1.4.1.12196.12.2.1.1.1' results: '1'
+ index_parse at OID: '1.3.6.1.4.1.12196.12.2.1.1.2' results: '2'
+ index_parse at OID: '1.3.6.1.4.1.12196.12.2.1.1.3' results: '3'
..
+ index_parse at OID: '1.3.6.1.4.1.12196.12.2.1.1.92' results: '92'
+ Inserting index data for field 'iprsIndex' [value='1']
+ Inserting index data for field 'iprsIndex' [value='2']
+ Inserting index data for field 'iprsIndex' [value='3']
..
+ Inserting index data for field 'iprsIndex' [value='92']
+ Located input field 'iprsDesc' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.12196.12.2.1.11'
+ Found item [iprsDesc='10.10.1.173:22 Masq 0'] index: 1 [from value]
+ Found item [iprsDesc='10.10.1.222:22 Masq 0'] index: 2 [from value]
+ Found item [iprsDesc='10.10.1.90:25 Masq 0'] index: 3 [from value]
...
+ Found item [iprsDesc='10.10.1.223:80 Masq 0'] index: 92 [from value]
4. Add a Data Template
5. Create graph templateData Template
Name: Kemp
Data Source
Name: |query_iprsDesc| - Bytes (check user per-data source value)
Data Input Method: Get SNMP Data (Indexed)
Data Source Active: Check
Data Source Item:
Internal Data Source Name: BytesOut
Min Value: 0
Max Value: U
Data Source Type: Counter
check "user per-data source value" for Index Type, Index Value, Output Type-ID
Title: |query_iprsDesc| - BytesOut
Use per-graph value checked
Added 1 Graph Template Item
Data Source: Kemp - (iprsBytesOut)
Graph Item Inputs shows:
Data Source [iprsBytesOut]
6. Data Queries -> Assocated Graph Templates -> Add
Name: kemp
Graph Template: kemp
check data source for iprsBytesOut
Add suggested Values
Data Template: BytesOut - |query_iprsDesc| --> Name
Graph Template: BytesOut - |query_iprsDesc| --> Title
save
7. I goto the device, "create graphs for this Host" I select any random one, hit create
If we look at the graph, it doesn't seem to be populating the query_iprsDesc value The same with the data source name, and if we look at details of the data source , it has no index value assigned If we look at devices We see there is one graph and one data source assigned, but status remains unknown, and no matter what level of debug I use, nothing in the Logs ever suggests it even looks at this host/data source on polling.
If I add any other standard data source (interface network traffic), the device is polled and a graph is generated for that data source, but nothing occurs for the other graph data source (missing rra and graph image)
The difference is snmp -v2c ... any suggestions on how to debug and find out why it is not firing?