check_snmp_mem.pl is a Nagios plugin that can be used to monitor the memory usage on Cisco IOS devices.

This post describes how to use the check_snmp_mem_proc Nagios plugin, which is a modified version of check_snmp_mem.pl that supports the CISCO-ENHANCED-MEMPOOL-MIB.

Refer to the following post to install Icinga, PNP4Nagios, and NagiosQL on FreeBSD.

Install the software

# cd /usr/ports/ports-mgmt/portmaster
# make clean all install
# make clean
# rehash
# portmaster net-mgmt/p5-Net-SNMP
#
# fetch -o /usr/local/libexec/icinga/check_snmp_mem_proc http://xydmz.net/wp-content/uploads/2013/01/check_snmp_mem_proc
# chmod 555 /usr/local/libexec/icinga/check_snmp_mem_proc

Usage example

define command {
 command_name check_snmp_mem_proc_enh_maxfree
 command_line $USER1$/check_snmp_mem_proc -H $HOSTADDRESS$ -C Community -w "$ARG1$" -c "$ARG2$" -I -P -M -e -t 3
 register     1
}

define service {
 hostgroup_name      cisco-ios-devices
 service_description Cisco IOS Memory Enhanced
 use                 generic-service
 check_command       check_snmp_mem_proc_enh_maxfree!90%!95%
 register            1
}

define hostgroup {
 hostgroup_name cisco-ios-devices
 alias          Cisco IOS Devices
 register       1
}

define host {
 host_name  mycisco
 hostgroups cisco-ios-devices
 use        host-pnp,generic-host
 register   1
}