Add nagios rules for taskotron dev client hosts
This commit is contained in:
parent
b0d1f67504
commit
7f6b8f82e8
6 changed files with 47 additions and 0 deletions
|
@ -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
|
||||||
|
|
8
roles/nagios_server/files/nagios/services/testcloud.cfg
Normal file
8
roles/nagios_server/files/nagios/services/testcloud.cfg
Normal 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
|
||||||
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
19
roles/nagios_server/files/plugins/check_testcloud
Normal file
19
roles/nagios_server/files/plugins/check_testcloud
Normal 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
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue