- Nagios Network Monitoring
- General Information and TidBits
- Installation Tips & Tricks
- Addons, Plugins, Tweaks & Customizations
- Checking Drupal Status with Nagios and WebInject
- AddOn - NRPE / NSClient
- AddOn - Nagios Event Log aka NagEventLog
- Addon - Nagios Passive Checks with NSCA
- Nagios Custom Object Variables
- Nagios Event Handler - Restart Remote Service
- Nagios Event Handler - Restarting a Local Service
- Plugin: check_dns_secondary - Checking NS Servers
- Plugin: check_http_requisites - Page Size, Files, and Loadtime
- Plugin: check_mem - Linux Memory Usage
- Plugin: check_sql - Check MSSQL and MYSQL servers
- Plugin: check_svn - Check Subversion
- Tweak - Nagios Jabber / XMPP Notifications
- Tweak - Nagios SMS Messaging
- Tweak - check_file_age to check_file_modified
- Tweak: Using NagiosGraph's SHOW.CGI
- Tweak: check_sql - Allow decimal values
- Common Errors & Fixes
Plugin: check_mem - Linux Memory Usage
- References:
A plugin written in perl to monitor and check thresholds for memory based on the output of the 'free -mt' command.
Ref: Nagios Exchange - check_mem page
Installation
- Copy the file to your /usr/local/nagios/libexec directory of the host you are monitoring
- Set the file mode to 755
- Add a line to your nrpe.cfg file and restart the service.
- Add the NRPE check to the appropriate configuration file on your Nagios server like:
command[check_mem]=/usr/local/nagios/libexec/check_mem -w 80,20 -c 95,50
define service{
use servicetemplate2
hostgroup_name linux-servers
service_description tmp
check_command check_nrpe!check_tmp
}
Command Line Syntax
# /usr/local/nagios/libexec/check_mem -w 50,20 -c 80,50 <b>WARNING: Memory Usage (W> 50, C> 80): 72% <br>Swap Usage (W> 20, C> 50): 0%</b> \ |MemUsed=72%;50;80 SwapUsed=0%;20;50
Display the Data
To add this to your "map" file for NagiosGraph, append the code to capture the data like below:
# Service type: check_mem
# check command: check_nrpe!check_mem -w 50,10 -c 80,25
# output: <b>CRITICAL: Memory Usage (W> 80, C> 95): 100% <br>Swap Usage (W> 20, C> 50): 0%</b>
# perfdata: MemUsed=100%;80;95 SwapUsed=0%;20;50
/perfdata:.*MemUsed=(\d+)%;(\d+);(\d+).*?SwapUsed=(\d+)%;(\d+);(\d+)/
and push @s, [ memory,
[ ramuse, GAUGE, $1 ],
[ swapuse, GAUGE, $4 ] ];

Recent comments
7 weeks 3 days ago
24 weeks 6 days ago
28 weeks 5 hours ago
37 weeks 6 days ago
45 weeks 2 days ago
45 weeks 4 days ago
50 weeks 1 day ago
1 year 1 week ago