Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Exactly what I need is to query OIDs ".1.3.6.1.4.1.119.2.3.69.401.8.1.1.3.1" and ".1.3.6.1.4.1.119.2.3.69.401.8.1.1.5.1", but with ".1" at the end script returns no data. If remov the ".1" from script, then after Verbose Query i get this:
+ Running data query [15].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/nec_neo.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.119.2.3.69.401.8.1.1'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.1.1' value: '1'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.1.2' value: '2'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.2.1' value: '2'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.2.2' value: '1'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.3.1' value: '+08.9'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.3.2' value: '#####'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.4.1' value: '2'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.4.2' value: '1'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.5.1' value: '-46.7'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.5.2' value: '#####'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.6.1' value: '2'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.6.2' value: '1'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.7.1' value: '-53'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.7.2' value: '###'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.8.1' value: '2'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.8.2' value: '1'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.9.1' value: '+03.1'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.9.2' value: '#####'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.10.1' value: '2'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.10.2' value: '1'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.11.1' value: '+28.2'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.11.2' value: '#####'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.12.1' value: '127'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.12.2' value: '127'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.13.1' value: '0'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.13.2' value: '-1'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.14.1' value: '8'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.14.2' value: '-1'
+ Located input field 'rxLevel' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.119.2.3.69.401.8.1.1.3'
+ Found item [rxLevel='+08.9'] index: 1 [from value]
+ Found item [rxLevel='#####'] index: 2 [from value]
+ Located input field 'txLevel' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.119.2.3.69.401.8.1.1.5'
+ Found item [txLevel='-46.7'] index: 1 [from value]
+ Found item [txLevel='#####'] index: 2 [from value]
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/nec_neo.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/nec_neo.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/nec_neo.xml'
So it returns 4 values (including that '#####'). How can i filter this and get only values at indes: 1 for both of the OIDs?
In case you need to query a single OID only, please use the "Generic OID template".
Or use a script that snmpget's waht you need.
Using the Data Query approach, you'll have to pay attention to "<oid_index>.1.3.6.1.4.1.119.2.3.69.401.8.1.1</oid_index>". In your example, this will NOT return a single numeric as an index!
"<oid_index>.1.3.6.1.4.1.119.2.3.69.401.8.1.1.3</oid_index>" might work better.
See walkthrough at 1st link of my sig for more explanations
R.
+ Running data query [15].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/nec_neo.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.119.2.3.69.401.8.1.1.3'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.3.1' value: '+09.0'
+ Index found at OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.3.2' value: '#####'
+ Located input field 'rxLevel' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.119.2.3.69.401.8.1.1.3'
+ Found item [rxLevel='+09.0'] index: 1 [from value]
+ Found item [rxLevel='#####'] index: 2 [from value]
+ Located input field 'txLevel' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.119.2.3.69.401.8.1.1.5'
+ Found item [txLevel='-47.5'] index: 1 [from value]
+ Found item [txLevel='#####'] index: 2 [from value]
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/nec_neo.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/nec_neo.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/nec_neo.xml'
And yes, I´ve spended many hours reading many articles incl. walkthrough. But I´m still a quite new to this and it´s a too much info for me at this time (specially, if not a "coder" ) .
IMHO there's a fundamental misunderstanding regarding SNMP Data Queries.
Yes, the _usually_ will return more than one index (a table consisting of one line only is a weird table).
And yes, you _usually_ will select those lines only, that you are interested in. In this case, you will select the line related to index value 1.
So all I can see now, is that the Data Query is working well.
You may ask now: Where will I select the index I need? Well, when "Creating Graphs fro this Host", you will be presented with the full table and select the line that you need, only. This will allow you to create e.g. a temperature graph (evaluating the OID: '1.3.6.1.4.1.119.2.3.69.401.8.1.1.3.1') and a traffic graph, using the other two items.
So you will have to create two graphs and associate both with this Data Query. All should be explained step by step by my walkthroughs
R.