Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_mem.pl
2009-06-05
- Nagios 2.x
- Nagios 3.x
277528
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!
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.
See http://www.sysadminsjourney.com/content/2009/06/04/new-and-improved-checkmempl-nagios-plugin for up to date information, and examples.
Reviews (6)
byKarpe, September 20, 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?
Why is it so?
byNapsty, May 3, 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.
byyeonki, December 10, 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!"
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.
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.
thank you very much works very well
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.
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.