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
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
|
Loading…
Add table
Add a link
Reference in a new issue