Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Simple local memory percentage check
Current Version
1.0
Last Release Date
2013-09-11
Compatible With
- Nagios 3.x
Owner
Website
License
GPL
Hits
36642
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!
Usage: $PROGNAME [-v] -w -c [-i][include cached] [-b][include bufferred]
Reviews (1)
bynks_mmm, January 5, 2014
great simple plugin for Unix/linux. Satisfied my requirements. Just had one issue. Logic was wrong for calculating used memory. Fixed it as follows-
used=$(echo "(($total-$free) / $total)*100" | bc -l)
was -
used=$(echo "($free / $total)*100" | bc -l)
I used it with NRPE for remote check. Below steps-
1. Copy the downloaded script. Make change mentioned above. Name it check_memory.sh
Copy, check_memory.sh, to /usr/lib/nagios/plugins on remote host
2. Add a file check_memory.cfg on remote host with content as-
command[check_memory]=/usr/lib/nagios/plugins/check_memory.sh -w 85 -c 90
3. restart nrpe service
service nagios-nrpe-server restart
4. On nagios server, add below to /etc/nagios3/conf.d/services.cfg
#service for checking remote host memory usage
define service {
service_description check Memory Usage
host_name remote-host-name-from-hosts.cfg
check_command check_nrpe!check_memory
use default-service
}
5. reload nagios configuration
/etc/init.d/nagios reload
used=$(echo "(($total-$free) / $total)*100" | bc -l)
was -
used=$(echo "($free / $total)*100" | bc -l)
I used it with NRPE for remote check. Below steps-
1. Copy the downloaded script. Make change mentioned above. Name it check_memory.sh
Copy, check_memory.sh, to /usr/lib/nagios/plugins on remote host
2. Add a file check_memory.cfg on remote host with content as-
command[check_memory]=/usr/lib/nagios/plugins/check_memory.sh -w 85 -c 90
3. restart nrpe service
service nagios-nrpe-server restart
4. On nagios server, add below to /etc/nagios3/conf.d/services.cfg
#service for checking remote host memory usage
define service {
service_description check Memory Usage
host_name remote-host-name-from-hosts.cfg
check_command check_nrpe!check_memory
use default-service
}
5. reload nagios configuration
/etc/init.d/nagios reload