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

Login

Remember Me

check_mem_avail

Rating
4 votes
Favoured:
0
Hits
145664
Files:
FileDescription
check_mem_availbash script
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
A simple plugin for checking available physical memory based on concepts already in Nagios exchange. Requires no additional packages to be installed. Memory check is done via /proc/meminfo
This plugin excludes the system cache and buffer, because on systems with stable memory usage it is perfectly normal for system cache to fill in all available memory (most of it can be freed at any time if applications requires it). Keep a margin for system cache and buffers when setting thresholds.
Reviews (3)
bykogepathic, September 15, 2014
>Requires no additional packages to be installed.

This is incorrect. The script requires that bc is installed. bc is not included in the base install of CentOS 7.
byCircaLucid, September 25, 2013
1 of 1 people found this review helpful
I installed Nagios on Ubuntu 12.04. For this script to work, I had to move #!/bin/bash to the very first line. Perfect otherwise. Thank you!
byhypnoz, August 23, 2012
1 of 1 people found this review helpful
Nice plugin, one of the few that is written in bash and not perl (which always seems to require the Nagios::Plugin perl module).

There is a typo at the end, the OK statement on line 103 has "$available" spelled incorrectly so it won't return the mem usage on an OK result. Easy fix though.

I also changed the exit code on "usage" stuff to exit 4 which is the Unknown state.

Thanks for a nice check.