[Nagiosplug-devel] check_memory plugin
Gary Danko
gary at hekal.org
Fri Jun 11 08:34:00 CEST 2004
Hi all,
After using the memory checking feature of the check_nt plugin, I wanted
to create something similar for my Linux machines. So I wrote something
in Perl to check memory and report on it. This plugin relies on the
Linux "free" command so unfortunately it's currently limited to Linux
machines... until I can find a better way to gather memory usage stats.
Command usage is:
Usage: check_memory -t [physical|swap|total] -w limit -c limit
check_memory [-v|--version]
check_memory [-h|--help]
Output looks like this:
[root at mandrake libexec]# ./check_memory --type=swap --warn=50 --crit=10
Swap Memory OK: Total: 1019.71 MB - Used: 0.95 MB (0%) - Free: 1018.77
MB (100%)
[root at mandrake libexec]# ./check_memory --type=physical --warn=50 --crit=10
Physical Memory CRITICAL: Total: 501.83 MB - Used: 485.27 MB (97%) -
Free: 16.12 MB (3%)
[root at mandrake libexec]# ./check_memory --type=total --warn=50 --crit=10
Total Memory OK: Total: 1521.54 MB - Used: 486.14 MB (32%) - Free:
1035.40 MB (68%)
This is my first real plugin for Nagios and I do not know how to submit
it. What can I do to make it available for others?
Thanks :)
Gary
More information about the Devel
mailing list