Since I’m on a nagios and snmp kick this week, here’s a nagios snmp plugin I wrote to check memory and swap. The real difference between this script and the standard nagios plugins for memory / swap, is it takes buffered and cached memory into account, giving the real % free.
Here is the check_snmp_memory.pl script, and it’s usage is pretty simple:
define command{
command_name check_snmp_memory
command_line /usr/bin/perl $USER1$/check_snmp_memory.pl -w 80 -c 90 $HOSTADDRESS$
}
And for swap, just add -s
define command{
command_name check_snmp_swap
command_line /usr/bin/perl $USER1$/check_snmp_memory.pl -s -w 50 -c 75 $HOSTADDRESS$
}
And like my previous post on check_snmp.pl (which this script is largely based on), it’s of the “it works for me” variety, and is released in the public domain.
As always, have fun!
Pingback: You can find my stuff on GitHub | cormander's blog