put in the first run at new nagios configs
This commit is contained in:
parent
a1957d29d4
commit
8cf72ff116
310 changed files with 13255 additions and 26 deletions
19
roles/nagios_server/files/nagios/plugins/check_testcloud
Normal file
19
roles/nagios_server/files/nagios/plugins/check_testcloud
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue