Memory

check_mem.pl

Description:

check_mem.pl is a Solaris, Linux, and other Unix compatible perl script that:
a) Enables perfdata output
b) On Solaris – gathers statistics about the ZFS ARC cache
c) On Linux – gathers statistics about the caches and buffers from /proc/meminfo
d) When run on a supported OS, it gives you the option to count RAM used as cache as free memory.

Current Version

Last Release Date

2009-06-05

Compatible With

  • Nagios 2.x
  • Nagios 3.x

Project Notes
Reviews (6) Add a Review
**ePN /usr/lib/nagios/plugins/check_mem.pl: "Argument "-c" isn't numeric in numeric eq (==) at (eval 5) line 322,".
by Karpe, September 30, 2015

I used the plugin and when checked manually it works, but in the CGI i dont get the expected result. In the status information it should show soothing like 'OK - 33.5% (2557620 kB) free.', but what i get is '**ePN /usr/lib/nagios/plugins/check_mem.pl: "Argument "-c" isn't numeric in numeric eq (==) at (eval 5) line 322,".' Why is it so?



Works great - multi OS featured
by Napsty, May 31, 2013

I came across this plugin when looking for a multi-os check_mem plugin and was satisfied. By the way: I contributed the FreeBSD memory check to this plugin, you should check it on the official github repository.



Solution when you get an erro: Return code of -1 is out of bounds
by yeonki, December 31, 2012

It works well. I set wrong parameter value with this script and I found an error that its message was "Return code of -1 is out of bounds" from Nagios Web UI. It was not intended thing. It was because wrong exit_code in the code: %exit_codes = ('UNKNOWN' ,-1, 'OK' , 0, 'WARNING' , 1, 'CRITICAL', 2, ); If you change of 'UNKNOWN' to 3, you would not be given that message, instead, you get proper error massage like this: "*** WARN level must not be less than CRITICAL when checking FREE memory!"



OpenBSD 5 + NPRE
by Kirk, February 29, 2012

This memory check works and graphs in pnp4nagios. I am running Nagios on Centos 6 and monitoring remote OpenBSD servers with check_nrpe. One issue I notice is it's showing MB values with KB next to them, so in my graph 66kb is actually 66MB. This check also does not include the OS cache for OpenBSD, not a huge issue if you just note what the overhead of your cache is. Nice work. This is the only memory check I could find that works and graphs for remote OpenBSD 5 servers using check_nrpe.



Wow
by Ninel, February 29, 2012

thank you very much works very well



works great
by Majed, August 31, 2011

it is a great plugin that produces graphs in nagios even and i used it as follows ./check_mem.pl -u -w 85 -c 90 but i wish the -f flag could be used along side the -u flag so that both free and used memory would be displayed in nagios.



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
4.5 (14)
Favorites
5
Views
277,184