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


Remember Me

Directory Tree

5 votes
Current Version
Last Release Date
Compatible With
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Compatible with Linux including RHEL 7+

This plugin is loosely inspired by check_mem v1.1 from Lukasz Gogolin

I did a code rewrite and added a check of "free" version, because since procps-ng 3.3.0+ (RHEL 7+) doesn't work anymore as it is (buff/cache column)

See Github or website for last version 1.1

* [-w ] [-c ] [-v] [-l]
- checks local host available memory
- warnlevel and critlevel is percentage value without %
- defaults being respectively 80 et 90
- add -v for verbose (debuging purpose)
- add -l for legacy perfdata mode (or change LEGACY_PERFDATA variable in script)
* -V
- prints version
* -h
- prints help (this message)

Similarities/differences between
- Both don't need much to run: only bash, free and awk
- Compatible with "free" binary from either procps AND procps-ng (newer) whereas is not
- Same basic syntax, you can exchange both scripts without changing your Nagios(r) configuration much
- You can choose to keep perfdata identical to OR display a modern graph with min/max bounds and warning/critical lines
- Added defaults to warn and critical, and help/version/verbose/legacy_perfdata flags

OK: Memory below thresholds. Total: 7984 MB - Used: 288 MB - 3% used. | Memory_Used=302661632;6698119987;7535384985;0;8372649984
./ -w 70 -c 85
OK: Memory below thresholds. Total: 7984 MB - Used: 288 MB - 3% used. | Memory_Used=302796800;5860854988;7116752486;0;8372649984
./ -w 70 -c 85 -l
OK: Memory below thresholds. Total: 7984 MB - Used: 289 MB - 3% used. | TOTAL=8372649984;;;; USED=303390720;;;; CACHE=7834243072;;;; BUFFER=613666816;;;;
Reviews (2)
byCharlesA, June 22, 2017
1 of 1 people found this review helpful needs bc which is not installed by default on Debian

LEGACY_PERFDATA prints buffer and cache separately. I guess that is for backwards compatibility with
byLijiman, June 16, 2016
1 of 1 people found this review helpful
I just today ran into the problem you noted about procps-ng and the buff/cache column and subsequently found this new version! Working great! Thank you!!