SNMP and MIB files
Status: Contributor
Joined: 13 Apr 2009
Posts: 85
Reply Quote

today I play a bit with snmp.

I have to monitor humidity and temperature from a Megatec (Mega System Technologies) UPS, it has an external sensor to monitor humidity and temperature, in a server room is useful!

NetFeeler 2 (the external sensor) support snmp, so you can monitor temperature via snmp inside a nagios (centreon) and send alarms.

To work in a debian stable there are some things to do (extra to install snmpd):

1) copy the MIBs files (provided on a cdrom with the sensor) in /usr/share/snmp/mibs

2) use snmpbulkget and not snmpwalk it give the following error:

Error in packet.
Reason: (genError) A general failure occured
Failed object: SNMPv2-SMI::mib-

3) read from the provided mib file (is a plain text file) the name of the value that we want read

4) read the values:

snmpbulkget -Cn2 -v 2c -c public upsEnvHumidity upsEnvTemperature

XPPC-MIB::upsEnvHumidity.0 = INTEGER: 21
XPPC-MIB::upsEnvTemperature.0 = INTEGER: 212

the temperature is a float but they use an integer so 212 is 21.2 C (I verify it from the NetAgent of the UPS).
Back to top
Display posts from previous:   

All times are GMT - 8 Hours