nagios check_testcloud: add client-side definition

This commit is contained in:
Martin Krizek 2016-02-17 09:59:01 +00:00
parent 3c7653a350
commit 6947b5d382
3 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#!/bin/bash
RUNNING_VMS=`testcloud instance list | grep -i 'running' | wc -l`
CRITICAL=20
WARNING=15
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

@ -54,6 +54,7 @@
- check_memcache_connect
- check_readonly_fs
- check_lock_file_age
- check_testcloud
when: not inventory_hostname.startswith('noc')
tags:
- nagios_client
@ -121,6 +122,7 @@
- check_koschei_resolver_proc.cfg
- check_koschei_scheduler_proc.cfg
- check_koschei_watcher_proc.cfg
- check_testcloud.cfg
notify:
- restart nrpe
tags:

View file

@ -0,0 +1 @@
command[check_testcloud]={{ libdir }}/nagios/plugins/check_testcloud