Home Directory Plugins Operating Systems Linux Check memory plugin in python (uses cached memory correctly)

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com


Remember Me

Directory Tree

Check memory plugin in python (uses cached memory correctly)

3 votes
check_mem.pyInitial version
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Check memory plugin by parsing /proc/meminfo and taking Cached mem into consideration
This plugin is written in Python (no 'special' modules needed, just optparse and sys) and parses the output of /proc/meminfo. Unlike some other plugins that check memory, this one also takes cached memory into consideration and adds that to the available FreeMem. This plugin doesn't take Swap memory into consideration. There are other plugins that do that and IMHO if the hosts starts to swap, there's already a problem.

This plugin correctly reports Nagios plugin check results. For a quick description use the plugin from the commandline: ./check_mem.py --help
Reviews (2)
if int(options.crit_threshold) >= int(options.warn_threshold):
print "UNKNOWN: Critical percentage can't be equal to or bigger than warning percentage."

Should it not be the opposite?
byshahirk, February 11, 2014
I tested this plugin on fedora 18. Plugin works well.