[solved]Problem with SNMP-generic oid template

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
wjemail
Posts: 6
Joined: Sat Dec 06, 2008 10:35 pm

[solved]Problem with SNMP-generic oid template

Post by wjemail »

I am testing to monitor the memory usage of the linux machine. From the output of snmpwalk, the value of the OID is:
[root@nms rra]# snmpwalk -v1 -cfaplpublic localhost .1.3.6.1.4.1.2021.51.101.1
UCD-SNMP-MIB::ucdavis.51.101.1 = STRING: "15"
It is confirmed the value should be around 15.

However, when I create a graph by use of this OID, the value on the diagram is around 4. I have attached the screenshot of my configuration and the diagram. During the configuration, I did not change any default value except the title, OID...

It is highly appreciated if anyone could help. Thanks!

Wang Jun
Attachments
cacti20081206.pdf
(158.75 KiB) Downloaded 135 times
Last edited by wjemail on Thu Dec 11, 2008 4:09 am, edited 1 time in total.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please visit the Graph at Graph management, switch to debug and post the resulting rrdtool graph statement. Looking for a CDEF ...
Reinhard
wjemail
Posts: 6
Joined: Sat Dec 06, 2008 10:35 pm

the results of rrdtool and cdef

Post by wjemail »

I have attached the rrdtool and cdef.
1. I never manually edit anything in the cdef ;
2. the graphs of other monitoring targets (like real memory, cpu) are ok except this generic OID.

Thanks,

Wang Jun
Attachments
cacti20081207.pdf
(322.63 KiB) Downloaded 134 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Well, that's indeed fine.
Now, please see 2nd link of my sig to learn how to use DEBUG mode for the poller. Then, please find the result of your script in the cacti.log. Please post this along with the "rrdtool update" command for that rrd file.
Reinhard
wjemail
Posts: 6
Joined: Sat Dec 06, 2008 10:35 pm

debug information

Post by wjemail »

Sorry I don't know which post I should refer to. Anyway, is the information below helpful?

[root@nms log]# cat cacti.log | grep -i snmp_oid
12/08/2008 06:05:02 PM - CMDPHP: Poller[0] Host[2] DS[141] SNMP: v1: 127.0.0.1, dsname: snmp_oid, oid: .1.3.6.1.4.1.2021.51.101.1, output: 6
12/08/2008 06:05:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (141, 'snmp_oid', '2008-12-08 18:05:02', '6')"
12/08/2008 06:05:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='141' and rrd_name='snmp_oid' and time='2008-12-08 18:05:02'"
12/08/2008 06:05:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/nms_snmp_oid_141.rrd --template snmp_oid 1228730702:6
12/08/2008 06:10:02 PM - CMDPHP: Poller[0] Host[2] DS[141] SNMP: v1: 127.0.0.1, dsname: snmp_oid, oid: .1.3.6.1.4.1.2021.51.101.1, output: 6
12/08/2008 06:10:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (141, 'snmp_oid', '2008-12-08 18:10:02', '6')"
12/08/2008 06:10:03 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='141' and rrd_name='snmp_oid' and time='2008-12-08 18:10:02'"
12/08/2008 06:10:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/nms_snmp_oid_141.rrd --template snmp_oid 1228731002:6


[root@nms log]# snmpwalk -v1 -cfaplpublic localhost .1.3.6.1.4.1.2021.51.101.1
UCD-SNMP-MIB::ucdavis.51.101.1 = STRING: "20"

Thanks and Regards,

Wang Jun
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: debug information

Post by gandalf »

wjemail wrote:12/08/2008 06:05:02 PM - CMDPHP: Poller[0] Host[2] DS[141] SNMP: v1: 127.0.0.1, dsname: snmp_oid, oid: .1.3.6.1.4.1.2021.51.101.1, output: 6
This shows that a value of "6" is retrieved. The rrdtool update command stores this value. All seems fine. Is the graph showing the number of "6"?
Reinhard
wjemail
Posts: 6
Joined: Sat Dec 06, 2008 10:35 pm

the value obtained from poller is different from snmpwalker

Post by wjemail »

Actually, the graph matches the output from the poller. However, as shown in my former post, for the OID .1.3.6.1.4.1.2021.51.101.1:
the value retrieved via Cacti Poller:
dsname: snmp_oid, oid: .1.3.6.1.4.1.2021.51.101.1, output: 6

but the value retrieved via snmpwalk
[root@nms log]# snmpwalk -v1 -cfaplpublic localhost .1.3.6.1.4.1.2021.51.101.1
UCD-SNMP-MIB::ucdavis.51.101.1 = STRING: "20"


I am not sure why the value is different.

Thanks and Regards,

Wang Jun
wjemail
Posts: 6
Joined: Sat Dec 06, 2008 10:35 pm

Any opinion?

Post by wjemail »

Is it possible the string OID type issus?

Thanks and Regards,

Wang Jun
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Any opinion?

Post by gandalf »

wjemail wrote:Is it possible the string OID type issus?

Thanks and Regards,

Wang Jun
No, that shouldn't matter.
Reinhard
wjemail
Posts: 6
Joined: Sat Dec 06, 2008 10:35 pm

[solved] You are right

Post by wjemail »

You are right !
I wrote another script to monitor the SNMP OID by snmpwalk. I found the value of the OID reduced a lot at the instance of each polling. So, there's no mismatch between the value retrieved by Cacti and the value retrieved by snmpwalk.

Thanks for your help!

Wang Jun
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests