nagios: Modify check for swap to allow no swap.

If a machine is configured with no swap intentationally, that
shouldn't be a Nagios problem.  This alert is intended to flag
machines which are swapping.
This commit is contained in:
Tim Abbott 2016-07-31 14:45:39 -07:00 committed by Tim Abbott
parent 80a16bf873
commit 162eaf8917
2 changed files with 3 additions and 2 deletions

View File

@ -133,7 +133,8 @@ define command{
define command{ define command{
command_name check_remote_swap command_name check_remote_swap
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_swap -w $ARG2$ -c $ARG3$' # `-n ok` means having no swap is OK
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_swap -w $ARG2$ -c $ARG3$ -n ok'
} }
define command { define command {

View File

@ -583,7 +583,7 @@ define service {
define service { define service {
use generic-service use generic-service
hostgroup_name has_swap hostgroup_name all
service_description swap service_description swap
check_command check_remote_swap!22!80%!50% check_command check_remote_swap!22!80%!50%
contact_groups admins contact_groups admins