Cacti is adding a .1 to the end of my oid's in the log

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
jjancel
Posts: 23
Joined: Wed Jun 10, 2009 11:59 am

Cacti is adding a .1 to the end of my oid's in the log

Post by jjancel »

Version 0.8.7i
I'm trying to graph memory swap ins and outs. I found the OID's on this website http://net-snmp.sourceforge.net/docs/mi ... l#ssSwapIn. The ones I'm interested in are .1.3.6.1.4.1.2021.11.3, and .1.3.6.1.4.1.2021.11.4. When I run an snmpwalk I get;
[root@cacti log]# snmpwalk -v 2c -c public hsweb04 .1.3.6.1.4.1.2021.11.3.0
UCD-SNMP-MIB::ssSwapIn.0 = INTEGER: 0

Here is the contents of my data query that I wrote
<interface>
<name>Swap Average</name>
<oid_index>.1.3.6.1.4.1.2021.11.1</oid_index>
<index_order>SwapIndex</index_order>
<index_order_type>alphabetic</index_order_type>

<fields>
<SwapIndex>
<name>Index</name>
<source>index</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.2021.11.1</oid>
</SwapIndex>

<Swap_ins>
<name>Swap Ins</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2021.11.3</oid>
</Swap_ins>
<Swap_outs>
<name>Swap Outs</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.2021.11.4</oid>
</Swap_outs>

</fields>
</interface>
The results of my verbose data query are;
Running data query [37].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/var/www/html/resource/snmp_queries/Swap_Ins_Outs_Avg.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.2021.11.1' Index Count: 1
+ Index found at OID: '1.3.6.1.4.1.2021.11.1.0' value: '1'
My graph is returning nan. When I looked in the log file to see what cacti is doing it shows;

08/15/2013 01:27:06 PM - SPINE: Poller[0] Host[241] DS[12367] SNMP: v2: hsweb04.*****.***, dsname: Swap_ins, oid: .1.3.6.1.4.1.2021.11.3.1, value: U

It added a .1 to the end of my OID.
Trying to do an snmpwalk with an additional .1 gives an error that there is no such instance currently there.

So I played with snmpget, and .1.3.6.1.4.1.2021.11.3.0 returns "interger: 0" So I changed my data query from walk to get, and added the .0 to the end of it, and let it run again. Now in the log file it shows ....11.3.0.1. Why is Cacti adding a .1 onto the OID and thus I'm not getting a valid result?

Does this line from the verbose query indicate where the problem might be "+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.11.1' Index Count: 1" ?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti is adding a .1 to the end of my oid's in the log

Post by gandalf »

You told Cacti in your XML file to use .1.3.6.1.4.1.2021.11.1 as the index of an SNMPtable.
Cacti will perform an snmpwalk to get all valid indexes. Cacti will then split off the last number of the result and use this as an index for all <fields>.

So, it is crucial to know what an snmpwalk at .1.3.6.1.4.1.2021.11.1 provides
R.
jjancel
Posts: 23
Joined: Wed Jun 10, 2009 11:59 am

Re: Cacti is adding a .1 to the end of my oid's in the log

Post by jjancel »

From the website that I put in my original post.

1 ssIndex INTEGER32 ReadOnly .1.3.6.1.4.1.2021.11.1 Bogus Index. This should always return the integer 1.

Which it does when I do my snmpwalk it returns 1.
[root@cacti ~]# snmpwalk -v 2c -c public hsweb04 .1.3.6.1.4.1.2021.11.1
UCD-SNMP-MIB::ssIndex.0 = INTEGER: 1

So if it's a bogus index, how do I get my datquery to return the proper response.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti is adding a .1 to the end of my oid's in the log

Post by gandalf »

This is explained in full detail at 1st link of my sig, see SNMP Data Query Walkthrough
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest