- Nagios - Switch Interface Traffic
- How To - Linux Server Performance
- Notes - Building New ESXi Host for iSCSI with Jumbo Frames
- Microsoft Office Version Numbers (XP, 2003, 2007, 2010)
- ESXi Custom Welcome Screen Text
- PHP - Read Data from a CSV file
- PHP - Input Variables from URL
- Fix - WMI Error EventID 10
- Fix - EventID 4007 DNS Server Error
- FIX - CHECK_ESX3.PL Script
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 ] ];
