Add nagios rules for taskotron dev client hosts

This commit is contained in:
Martin Krizek 2016-01-18 13:29:21 +00:00
parent b0d1f67504
commit 7f6b8f82e8
6 changed files with 47 additions and 0 deletions

View file

@ -27,6 +27,13 @@ define service {
use disktemplate use disktemplate
} }
define service {
host_name qa11.qa
service_description Disk Space /srv/diskimages
check_command check_by_nrpe!check_disk_/srv/diskimages
use disktemplate
}
#define service { #define service {
# host_name hosted04 # host_name hosted04
# service_description Disk Space /srv # service_description Disk Space /srv

View file

@ -0,0 +1,8 @@
define service {
host_name qa11.qa
service_description Check Testcloud
check_command check_testcloud
max_check_attempts 5
use criticaltemplate
}

View file

@ -201,6 +201,7 @@ command[check_disk_/boot]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p
command[check_disk_/git]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /git command[check_disk_/git]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /git
command[check_disk_/postgreslogs]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /postgreslogs command[check_disk_/postgreslogs]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /postgreslogs
command[check_disk_/srv]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv command[check_disk_/srv]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv
command[check_disk_/srv/diskimages]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv/diskimages
command[check_disk_/var/lib64/mock]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /var/lib/mock command[check_disk_/var/lib64/mock]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /var/lib/mock
command[check_disk_/var/log]=/usr/lib64/nagios/plugins/check_disk -w 15% -c 10% -p /var/log command[check_disk_/var/log]=/usr/lib64/nagios/plugins/check_disk -w 15% -c 10% -p /var/log
command[check_disk_/srv/cache/lookaside]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv/cache/lookaside command[check_disk_/srv/cache/lookaside]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv/cache/lookaside

View file

@ -0,0 +1,19 @@
#!/bin/bash
RUNNING_VMS=`testcloud instance list | grep -i 'running' | wc -l`
$CRITICAL=10
$WARNING=4
if [ $RUNNING_VMS -gt $CRITICAL ]
then
echo "Testcloud: CRITICAL Number of VMs running: $running_vms"
exit 2
elif [ $RUNNING_VMS -gt $WARNING ]
then
echo "Testcloud: WARNING Number of VMs running: $running_vms"
exit 1
else
echo "Testcloud: OK Number of VMs running: $running_vms"
exit 0
fi

View file

@ -52,6 +52,12 @@ define command{
command_line $USER1$/check_koji command_line $USER1$/check_koji
} }
# 'check_testcloud'
define command{
command_name check_testcloud
command_line $USER1$/check_testcloud
}
# 'check by nrpe' # 'check by nrpe'
define command{ define command{
command_name check_by_nrpe command_name check_by_nrpe

View file

@ -67,6 +67,12 @@ define command{
command_line $USER1$/check_koji command_line $USER1$/check_koji
} }
# 'check_testcloud'
define command{
command_name check_testcloud
command_line $USER1$/check_testcloud
}
# 'test nrpe' # 'test nrpe'
define command{ define command{
command_name test_nrpe command_name test_nrpe