IPMI / SNMP / MRTG (WAS: RE: ipmi(4) (IPMI MIB?))

2006-02-03 Thread Brian A. Seklecki

On Thu, 26 Jan 2006, Bruce Shaw wrote:


We've actually got several different problems here.


Specifically, the OpenBSD implementation we're seeing here seems to
provide sysctl style access to Sensor data, watchdog info, etc., but what
about other IPMI functions?


I've been working on better sensor information for openBSD but lack reliable
access to a platform to develop on (a friend has been doing what he can).


On any number of occasions, I've offered personally to donate VMWare 
licenses to Net-SNMP developers to help bring *BSD support back into the 
mainstream :} ... That's a standing offer and I'm sure there are plenty 
of corporations that wouldn't mind contributing either.


I will say this, though.  It takes about 35 seconds to do an ipmitool sdr 
list full.  Thus, for every two values you would like to graph in MRTG,
you can add 35 seconds to the job's run time.  The time it takes to do an 
ipmi sensor get 'blah' is marginally different than a list.


$ time ipmitool -U netadmin -E -H sys-lom.priv -c sdr list full
Temp,43,degrees C,ok
Temp,40,degrees C,ok
[...]
real0m34.618s
user0m0.017s
sys 0m0.017s

Thus...a in-kernel IPMI--SNMP gateway interface would be optimal (Such 
as OpenBSD's) to relying on the Hardware/LOM/BMC Functionality, at least 
for the sensor related data.


The hardware interface on the BMC/NIC is infinitely useful.  You can VLAN 
it off into a management/out of band subnet and do hard-power resets, etc, 
from there.


Regarding MRTG, there are 8 sets of values to graph out from the sensor 
results on Dell PE 1850s/2850s that I have access to:


Set 1: CPU0 Temp, CPU1 Temp
Set 2: MB Ambient, MB Planar Temp
Set 3: Riser Temp  [Riser Temp]
Set 4: PS#0 Temp, PS#1 Temp
Set 5: CMOS Battery Volt  [CMOS Battery Volts]
Set 6: Fan 1A, Fan 1B
Set 7: Fan 2A, Fan 2B
Set 8: Fan 3A, Fan 3B
Set 9: Fan 4A, Fan 4B

I modified version of Chris Wilson's NAGIOS IPMI plugin can be used to 
poll the data into MRTG in a very ...VERY suboptimal, but functional, 
manor.


http://digitalfreaks.org/~lavalamp/ipmi_mrtg.pl

(this script lacks any kind of sanity checking)

MRTG Configs might look something like:


Target[SYSNAME.fan3]: `/usr/local/cf/ipmi_mrtg.pl 
SYSNAME-lom.pgh.priv.collaborativefusion.com f3`

PageTop[SYSNAME.fan3]: H1Fan Set 3 RPMs/H1
Title[SYSNAME.fan3]: Fan Set 3 RPMs
Options[SYSNAME.fan3]: nopercent,gauge,growright
#Legend3[SYSNAME.fan3]: Fan Set 3, Fan A RPMs
#Legend2[SYSNAME.fan3]: Fan Set 3, Fan b RPMs
YLegend[SYSNAME.fan3]: RPMs
ShortLegend[SYSNAME.fan3]: RPMsnbsp;
LegendI[SYSNAME.fan3]: nbsp;Fan Set 3, Fan A RPMs:nbsp;
LegendO[SYSNAME.fan3]: nbsp;Fan Set 3, Fan A RPMs:nbsp;
MaxBytes[SYSNAME.fan3]: 1


Target[SYSNAME.risertemp]: `/usr/local/cf/ipmi_mrtg.pl 
SYSNAME-lom.pgh.priv.collaborativefusion.com ri`

PageTop[SYSNAME.risertemp]: H1Motherboard Riser(s)/H1
Title[SYSNAME.risertemp]: Motherboard Riser(s)
Options[SYSNAME.risertemp]: nopercent,gauge,growright
#Legend1[SYSNAME.risertemp]: Motherboard Riser
#Legend2[SYSNAME.risertemp]: Motherboard Riser
YLegend[SYSNAME.risertemp]: Degrees Celcius
ShortLegend[SYSNAME.risertemp]: Degrees Cnbsp;
LegendI[SYSNAME.risertemp]: nbsp;Degrees C Motherboard Riser:nbsp;
#LegendO[SYSNAME.risertemp]: nbsp;Degrees C Motherboard Riser:nbsp;
MaxBytes[SYSNAME.risertemp]: 100


Target[SYSNAME.pstemp]: `/usr/local/cf/ipmi_mrtg.pl 
SYSNAME-lom.pgh.priv.collaborativefusion.com ps`

PageTop[SYSNAME.pstemp]: H1Power Supply Temperature(s)/H1
Title[SYSNAME.pstemp]: Power Supply Temperature(s)
Options[SYSNAME.pstemp]: nopercent,gauge,growright
#Legend1[SYSNAME.pstemp]: Temperature Power Supply #0
#Legend2[SYSNAME.pstemp]: Temperature Power Supply #1
YLegend[SYSNAME.pstemp]: Degrees Celcius
ShortLegend[SYSNAME.pstemp]: Degrees Cnbsp;
LegendI[SYSNAME.pstemp]: nbsp;Degrees C PS#0:nbsp;
LegendO[SYSNAME.pstemp]: nbsp;Degrees C PS#1:nbsp;
MaxBytes[SYSNAME.pstemp]: 100

Target[SYSNAME.batvolt]: `/usr/local/cf/ipmi_mrtg.pl 
SYSNAME-lom.pgh.priv.collaborativefusion.com cb`

PageTop[SYSNAME.batvolt]: H1CMOS Battery Voltage/H1
Title[SYSNAME.batvolt]: CMOS Battery Voltage
Options[SYSNAME.batvolt]: nopercent,gauge,growright
#Legend1[SYSNAME.batvolt]: Temperature CPU#0
#Legend2[SYSNAME.batvolt]: Temperature CPU#1
YLegend[SYSNAME.batvolt]: Volts DC
ShortLegend[SYSNAME.batvolt]: Volts Cnbsp;
LegendI[SYSNAME.batvolt]: nbsp;Volts CMOS Battery:nbsp;
#LegendO[SYSNAME.batvolt]: nbsp;Degrees C CPU#1:nbsp;
MaxBytes[SYSNAME.batvolt]: 6

Target[SYSNAME.cputemp]: `/usr/local/cf/ipmi_mrtg.pl 
SYSNAME-lom.pgh.priv.collaborativefusion.com cpu`

PageTop[SYSNAME.cputemp]: H1CPU Temperature(s)/H1
Title[SYSNAME.cputemp]: CPU Temperature(s)
Options[SYSNAME.cputemp]: nopercent,gauge,growright
#Legend1[SYSNAME.cputemp]: Temperature CPU#0
#Legend2[SYSNAME.cputemp]: Temperature CPU#1
YLegend[SYSNAME.cputemp]: Degrees Celcius
ShortLegend[SYSNAME.cputemp]: Degrees Cnbsp;
LegendI[SYSNAME.cputemp]: nbsp;Degrees C CPU#0:nbsp;
LegendO[SYSNAME.cputemp]: nbsp;Degrees C CPU#1:nbsp;

Re: IPMI / SNMP / MRTG (WAS: RE: ipmi(4) (IPMI MIB?))

2006-02-03 Thread Marco Peereboom
What's wrong with?
# sysctl hw | grep ipmi
hw.sensors.0=ipmi0, Temp, OK, temp, 43.00 degC / 109.40 degF
hw.sensors.1=ipmi0, Planar Temp, OK, temp, 30.00 degC / 86.00 degF
hw.sensors.2=ipmi0, CMOS Battery, OK, volts_dc, 3.12 V
hw.sensors.3=ipmi0, Front Fan, OK, fanrpm, 1258 RPM
hw.sensors.4=ipmi0, Back Fan, OK, fanrpm, 2052 RPM
hw.sensors.5=ipmi0, Intrusion, OK, indicator, Off

How is this any harder to parse?

And it does not take 35 seconds either.



Re: IPMI / SNMP / MRTG (WAS: RE: ipmi(4) (IPMI MIB?))

2006-02-03 Thread Les Mikesell
On Fri, 2006-02-03 at 13:59, Brian A. Seklecki wrote:

 On any number of occasions, I've offered personally to donate VMWare 
 licenses to Net-SNMP developers to help bring *BSD support back into the 
 mainstream :} ... That's a standing offer and I'm sure there are plenty 
 of corporations that wouldn't mind contributing either.

Off topic, but at this point you don't need a license for the
runtime.  If you have Workstation just build a downloadable
image with an OS installed if there isn't one already at
http://www.vmware.com/vmtn/vm/community.html.  Anyone can
then download the free player at
http://www.vmware.com/products/player/ and run it.  I think
the images are typically built with NAT network support and
it might be easier to test snmp with bridged, but it is
possible to make that change after the fact in the .vmx file
if necessary.

-- 
  Les Mikesell
   [EMAIL PROTECTED]