Network and Systems Management

check_used_mem

Description:

check_used_mem is a Nagios plugin for checking memory and swap usage on Linux and UNIX platforms.

Atention: It reports the USED memory, not the free memory. If you want to measure the free memory, you may want to take a look at another plugin I wrote, which is called check_free_mem
http://exchange.nagios.org/directory/Plugins/Network-and-Systems-Management/check_free_mem/details

It has separate thresholds (warning and critical) for RAM and swap usage.
It uses the output of “free” command and needs only grep and awk – no Perl, Python, PHP or SNMP.
The script makes all internal processing with float numbers, so the thresholds may be specified as float numbers, for an increased precision.

Current Version

0.93

Last Release Date

2014-10-31

Compatible With

  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI

License

GPL


Project Files
Project Notes
It reports the following performance data: - used memory (as an absolute number and in percents) - total memory - free memory - shared memory - buffers - cached memory - used swap (as an absolute number and in percents) Usage: check_used_mem [-v] [-h] [-w MemWarning] [-c MemCritical] [-W SwapWarning] [-C SwapCritical] Options: --version|-v) prints the program version --help|-h) prints this help information -w) specifies the warning threshold for memory usage -c) specifies the critical threshold for memory usage -W) specifies the warning threshold for swap usage -C) specifies the critical threshold for swap usage Example: # ./check_used_mem -w 90.5 -c 99.9 -W 1 -C 10 OK; Memory: total 996.8MB, used 274.1MB (27.5%), free 722.7MB (72.5%); Swap: total 1024.0MB, used 0B (0.0%), free 1024.0MB (100.0%) | 'used memory'=287461376B;945947586;1044200706;0;1045245952 'used memory (pct.)'=27.5%;90.5;99.9;0;100 'free memory'=757784576B;;;0;1045245952 'shared memory'=0B;;;0;1045245952 'buffers memory'=73318400B;;;0;1045245952 'cached memory'=122691584B;;;0;1045245952 'used swap'=0B;10737336;107373363;0;1073733632 'used swap (pct.)'=0.0%;1;10;0;100 ============= Oct. 31, 2014 What's new in version 0.93 - the path for binary executables is no more hard coded, which makes the script capable to run on virtually any Linux or UNIX system, without the need to edit it. - the path for binary executables (grep, awk, free) can be overwritten in the parameters section, at the beginning of the script - introduced a new function for bringing the size strings to humanly readable format (ex.: 1024 bytes=>1KB)
Reviews (1) Add a Review
Needs a lot of work
by kogepathic, September 30, 2014

This module needs a lot of work before it can be considered acceptable. The author has hard-coded "/usr/bin/awk", "/bin/awk" and "awk" into multiple places in the script. I had to fix this before it would even run. When you do get it running you'll find that the percentage warnings don't operate as expected. Instead of percentage free it's percentage used (eg. warn when percent used is over -w %) which is counter intuitive to almost every other nagios memory plugin. Furthermore the plugin does not differentiate between used memory and used memory+- buffers/cache. I do not recommend using this plugin until the author fixes the above points.



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
1 (1)
Favorites
0
Views
23,344