nagios snmp memory and swap plugin

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 script, and it’s usage is pretty simple:

define command{
  command_name check_snmp_memory
  command_line /usr/bin/perl $USER1$/ -w 80 -c 90 $HOSTADDRESS$

And for swap, just add -s

define command{
  command_name check_snmp_swap
  command_line /usr/bin/perl $USER1$/ -s -w 50 -c 75 $HOSTADDRESS$

And like my previous post on (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!

One thought on “nagios snmp memory and swap plugin”

Leave a Reply

Your email address will not be published. Required fields are marked *