Remind Me: Adding SNMP mibs for querying

I was having issues trying to get Nagios to more easily query my APC UPS with the APC-provided MIB. It took me a while to figure out the right bits both on the file system and in my query to have the MIB ‘processed.’ I still don’t know how to add that MIB to the “automatically process me too if snmpwalk is run” piece of the puzzle.

But for what I have running a home, some notes for myself and others who ripped out enough hair already.

jforman@monitor:/usr/share/snmp/mibs$ ls powernet401.mib  jforman@monitor:~$ cat /etc/snmp/snmp.conf mibs +PowerNet-MIB  jforman@monitor:/usr/share/snmp/mibs$ snmpwalk -v1 -c snmpcommunity ups1 apc PowerNet-MIB::upsBasicIdentModel.0 = STRING: "SMART-UPS 700" PowerNet-MIB::upsBasicIdentName.0 = STRING: "ups1" PowerNet-MIB::upsAdvIdentFirmwareRevision.0 = STRING: "50.14.D" 

Relevant Nagios configs:

define service { use generic-service check_command snmp_apcups_batterystatus!snmpcommunity service_description UPS Battery Status host_name ups1 }  define command { # OID corresponds to: PowerNet-MIB::upsBasicBatteryStatus.0 command_name snmp_apcups_batterystatus command_line /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o upsBasicBatteryStatus.0 -s "batteryNormal(2)" } 

Help and inspiration courtesy of