Graphing output of ipmitool, system temp to net-snmp?

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

Moderators: Developers, Moderators

Post Reply
nellson
Posts: 13
Joined: Thu Sep 13, 2007 1:13 pm

Graphing output of ipmitool, system temp to net-snmp?

Post by nellson »

I have an Intel server board that only let's me get system through it's BMC interface with ipmitool. So I am experimenting with net-snmp's ability to run a script to make this data easily available to an SNMP query.

It my quick test I got a shell script to return an integer result of JUST the temp. Added that to my snmp.conf but as I walk the exec addins, it claims the value I am getting is a STRING (Note the 34 in the output), and I suspect RRDTool doesn't like it as it shows NaN for the values in my graph. Has anyone done this sort of thing to get an INTEGER result?

Code: Select all

gubbie /var/www # snmpwalk -Os -v 1 -c ellson localhost .1.3.6.1.4.1.2021.8
extIndex.1 = INTEGER: 1
extIndex.2 = INTEGER: 2
extNames.1 = STRING: echotest
extNames.2 = STRING: SysTemp
extCommand.1 = STRING: /bin/echo
extCommand.2 = STRING: /bin/sh
extResult.1 = INTEGER: 0
extResult.2 = INTEGER: 15
extOutput.1 = STRING: hello world
extOutput.2 = STRING: 34
extErrFix.1 = INTEGER: noError(0)
extErrFix.2 = INTEGER: noError(0)
extErrFixCmd.1 = STRING: 
extErrFixCmd.2 = STRING: 
gubbie /var/www # cat /tmp/temp.sh
#/bin/bash

typeset -i a=`/usr/local/bin/ipmitool sensor reading "System Temp" | cut -d"|" -f2 | tr -d [:blank:]`

echo $a
exit 15

snmp.conf:

exec SysTemp /bin/sh /tmp/temp.sh

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

Post by gandalf »

At first, please search for IPMI templates in the scripts and templates forum. I'm quite sure you'll find something
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests