
Linux
check_mem_avail
Description:
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
Current Version
Last Release Date
June 16, 2009
Compatible With
Owner
Project Files
File | Description |
---|---|
check_mem_avail | bash script |
Project Notes
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)
Add a Review
>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.
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!
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.
Page Sections
Project Stats
Rating
4.3 (4)
Favorites
0
Views
150,976