How to graph 2 OIDs on 1 graph with separate Y-axis

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

Moderators: Developers, Moderators

Post Reply
Juggler
Posts: 5
Joined: Sun Aug 11, 2013 7:28 pm

How to graph 2 OIDs on 1 graph with separate Y-axis

Post by Juggler »

I've managed to hack an older Linksys WRT54GS router to run OpenWRT and have added 2x tempearture sensors to an unused/hidden serial port. After installing snmpd, I modified snmpd.conf to include:

Code: Select all

exec  checktemp_pool /bin/sh /bin/checktemp_pool
exec  checktemp_outside /bin/sh /bin/checktemp_outside
Each of the scripts generates a single string with the temperature (one in ºF, the other in ºC... hence the need for 2 axis). If I do an snmpwalk of the device, I see the following under the .1.3.6.1.4.1.2021.8.1 oid:

Code: Select all

macbook-air:~ user$ snmpwalk -v2c -c public wrt54gs.lan .1.3.6.1.4.1.2021.8.1
UCD-SNMP-MIB::extIndex.1 = INTEGER: 1
UCD-SNMP-MIB::extIndex.2 = INTEGER: 2
UCD-SNMP-MIB::extIndex.3 = INTEGER: 3
UCD-SNMP-MIB::extNames.1 = STRING: filedescriptors
UCD-SNMP-MIB::extNames.2 = STRING: checktemp_pool
UCD-SNMP-MIB::extNames.3 = STRING: checktemp_outside
UCD-SNMP-MIB::extCommand.1 = STRING: /bin/cat /proc/sys/fs/file-nr
UCD-SNMP-MIB::extCommand.2 = STRING: /bin/sh /bin/checktemp_pool
UCD-SNMP-MIB::extCommand.3 = STRING: /bin/sh /bin/checktemp_outside
UCD-SNMP-MIB::extResult.1 = INTEGER: 0
UCD-SNMP-MIB::extResult.2 = INTEGER: 0
UCD-SNMP-MIB::extResult.3 = INTEGER: 0
UCD-SNMP-MIB::extOutput.1 = STRING: 176	0	8192
UCD-SNMP-MIB::extOutput.2 = STRING: 78.24
UCD-SNMP-MIB::extOutput.3 = STRING: 23.88
UCD-SNMP-MIB::extErrFix.1 = INTEGER: noError(0)
UCD-SNMP-MIB::extErrFix.2 = INTEGER: noError(0)
UCD-SNMP-MIB::extErrFix.3 = INTEGER: noError(0)
UCD-SNMP-MIB::extErrFixCmd.1 = STRING: 
UCD-SNMP-MIB::extErrFixCmd.2 = STRING: 
UCD-SNMP-MIB::extErrFixCmd.3 = STRING: 
I'm interested in the extOutput.2 and .3 that correspond to oids .1.3.6.1.4.1.2021.8.1.101.2 and .1.3.6.1.4.1.2021.8.1.101.3.

I have been able to graph one of the values using the "SNMP - Generic OID Template". What I would like to see is both values being polled and graphed on a single graph, with ºC on one Y-axis corresponding to extOutput.3 and ºF on the other corresponding to extOutput.2.

Can anyone throw me any pointers?

Many thanks,
J.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: How to graph 2 OIDs on 1 graph with separate Y-axis

Post by gandalf »

rrdtool does now support 2 y-axis. Cacti will bring that support starting with 0.8.9 which currently is in alpha stage. Find the code in the unstable forum.
R.
Juggler
Posts: 5
Joined: Sun Aug 11, 2013 7:28 pm

Re: How to graph 2 OIDs on 1 graph with separate Y-axis

Post by Juggler »

Ahhh... good to know. I will not pursue the 2-axis problem any further.

That being said, can you offer any insights on how to graph both values on a single graph? I can easily convert from ºF to ºC on the device side so that Cacti only sees ºC.

many thanks,
J.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: How to graph 2 OIDs on 1 graph with separate Y-axis

Post by gandalf »

You would add the same data source twice, using different CDEFs to do the calculation
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests