no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | nagios_plugins [2015/10/08 16:41] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Nagios plugins ====== | ||
+ | * [[Nagios]] | ||
+ | * [[NRPE]] | ||
+ | |||
+ | ==== check_disk ==== | ||
+ | |||
+ | Check the amount of disk space available. | ||
+ | |||
+ | Warning on 20% remaining, critical on 10% remaining, looking at path "/": | ||
+ | |||
+ | < | ||
+ | check_disk -w 20% -c 10% -p / | ||
+ | </ | ||
+ | |||
+ | ==== check_load ==== | ||
+ | |||
+ | Check the current system load average. The load average format is the same used by " | ||
+ | |||
+ | * **-w WLOAD1, | ||
+ | * **-c CLOAD1, | ||
+ | * **-r** - Divide the load averages by the number of CPUs (when possible) | ||
+ | |||
+ | < | ||
+ | check_load -r -w 2,1.5,1 -c 4,3,2 | ||
+ | </ | ||
+ | |||
+ | ==== check_procs ==== | ||
+ | |||
+ | Check for running processes. | ||
+ | |||
+ | Some available arguments: | ||
+ | |||
+ | * **-w [num]: | ||
+ | * **-c [num]: | ||
+ | * **-u < | ||
+ | * **-a < | ||
+ | * **-C < | ||
+ | |||
+ | ** OpenSSH ** | ||
+ | |||
+ | SSHD will have one proc for the master daemon, and one for each user login as well. So setting a minimal range of 1 will check if it is running at all: | ||
+ | |||
+ | < | ||
+ | check_procs -c 1: -u root -C sshd -a / | ||
+ | </ | ||
+ | |||
+ | ** ntpd ** | ||
+ | |||
+ | < | ||
+ | check_procs -c 1: -u root -C ntpd -a / | ||
+ | </ | ||
+ | |||
+ | ** syslog-ng ** | ||
+ | |||
+ | < | ||
+ | check_procs -c 1: -u root -C syslog-ng -a / | ||
+ | </ | ||
+ | |||
+ | ==== check_swap ==== | ||
+ | |||
+ | Check swap space. | ||
+ | |||
+ | Warn on 20% available remaining, critical on 10%: | ||
+ | |||
+ | < | ||
+ | check_swap -w 20% -c 10% | ||
+ | </ |