Graphing a mib with multiple values

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

Moderators: Developers, Moderators

Post Reply
iamsure
Posts: 4
Joined: Tue Jan 22, 2008 4:18 pm

Graphing a mib with multiple values

Post by iamsure »

I've created an exec script that runs on a monitored machine. The machine runs the script, and happily answers snmpwalk. I formatted the script output to match cacti's defined preferences. Here is the snmpwalk:

UCD-SNMP-MIB::extIndex.1 = INTEGER: 1
UCD-SNMP-MIB::extNames.1 = STRING: cputemp.sh
UCD-SNMP-MIB::extCommand.1 = STRING: /root/bin/cputemp.sh
UCD-SNMP-MIB::extResult.1 = INTEGER: 0
UCD-SNMP-MIB::extOutput.1 = STRING: CPU1:109.40 CPU2:116.60 CPU3:105.80 CPU4:98.60 CPU5:102.20 CPU6:111.20 CPU7:111.20 CPU8:114.80
UCD-SNMP-MIB::extErrFix.1 = INTEGER: 0
UCD-SNMP-MIB::extErrFixCmd.1 = STRING:

As you can see, the output is a string with multiple (in this case, 8) item/value pairs. (I'm attempting to monitor AMD CPU temperatures)

I've tried following the "My First Graph Template" instructions, and also the "Create a graph from a single OID" instructions, but neither worked. I don't understand the process, so I'm sure its user error.

If it helps, I'm running 0.8.7a, on FreeBSD-6.2, snmp talking via net-snmp 5.3.1.

How can I get the above into cacti, graphing, and acting like a good little first class cacti graph citizen?

Many thanks in advance.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I don't believe cacti can natively parse that, so you're going to have to write a script that will. I'd suggest using the PHP script server (ss_* script) and using cacti's built-in snmp functionality. Follow the guide(s) in the documentation site.
iamsure
Posts: 4
Joined: Tue Jan 22, 2008 4:18 pm

Post by iamsure »

BSOD2600 wrote:I don't believe cacti can natively parse that
Its the exact format specified in the cacti documentation:

http://docs.cacti.net/node/26

I wrote a script to change the existing output to match that, and put it into snmp.

Can anyone tell me how to set up cacti to import this data?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

iamsure wrote:Its the exact format specified in the cacti documentation:
Correct, but cacti isn't expecting a single snmp string to contain all of that. Thats why you must spit it out with a script.
iamsure wrote:Can anyone tell me how to set up cacti to import this data?
http://docs.cacti.net/node/73
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests