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

Directory Tree

check_mem.pl

Last Release Date
2009-06-05
Compatible With
  • Nagios 2.x
  • Nagios 3.x
Hits
277061
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
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.
Reviews (6)
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?
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.
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!"
byKirk, February 25, 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.
byNinel, February 20, 2012
1 of 1 people found this review helpful
thank you very much works very well
byMajed, August 31, 2011
2 of 2 people found this review helpful
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.