check_disks_ucd
Check Disks via UCD SNMP MIB e.g: used on linux in net-snmp agent
Usage:
check_disks_ucd.pl -H [hostname]
more information concerning the configuration of the UCD SNMP Package:
man snmpd.conf
Requirements:
from search.cpan.org
Net::SNMP Package e.g: Net-SNMP-5.2.0.tar.gz
How to check the functionality:
Example:
snmpwalk 172.29.130.201 -v2c -c public enterprises.2021.9
should return some lines like these:
UCD-SNMP-MIB::dskIndex.1 = INTEGER: 1
UCD-SNMP-MIB::dskPath.1 = STRING: /
UCD-SNMP-MIB::dskDevice.1 = STRING: /dev/mapper/VolGroup00-LogVol00
UCD-SNMP-MIB::dskMinimum.1 = INTEGER: 10000000
UCD-SNMP-MIB::dskMinPercent.1 = INTEGER: -1
UCD-SNMP-MIB::dskTotal.1 = INTEGER: 11191892
UCD-SNMP-MIB::dskAvail.1 = INTEGER: 3656340
UCD-SNMP-MIB::dskUsed.1 = INTEGER: 6967028
UCD-SNMP-MIB::dskPercent.1 = INTEGER: 66
UCD-SNMP-MIB::dskPercentNode.1 = INTEGER: 9
UCD-SNMP-MIB::dskErrorFlag.1 = INTEGER: 1
UCD-SNMP-MIB::dskErrorMsg.1 = STRING: /: less than 10000000 free (= 3656340)
if not, check the configuration file
- on linux (/etc/snmp/snmpd.conf)
# disks checks (Examples) # disk PATH [ MINSPACE | MINPERCENT ] disk / 10000000
Define Command
Copy this plugin to the nagios plugin installation directory e.g.: /usr/lib(64)/nagios/plugin
COMMAND DEFINITION:
# "check_disks_ucd" command definition
define command{
command_name check_disks_ucd
command_line $USER1$/check_disks_ucd -H $HOSTADDRESS$
}
Changelog
Version 1.0 - 2007-12-15 | first release |
Version 1.1 - 2007-12-19 | fixed problem with **ePN |
(Missing right curly or square ...) | |
Version 1.2 - 2009-02-17 | some new "use lib .." statements |
Version 1.3 - 2010-03-24 | check error_status of snmp call |