Add basset monitoring

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2016-03-18 14:13:53 +00:00
parent 5e4522ca7b
commit bab7a6a286
5 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,22 @@
#!/bin/bash
QUEUE=$1
QUEUESIZE=`rabbitmqctl list_queues | grep $QUEUE | awk '{print $2}'`
CRITICAL=20
WARNING=15
if [ $QUEUESIZE -gt $CRITICAL ]
then
echo "queuesize: CRITICAL Queue size: $QUEUESIZE"
exit 2
elif [ $QUEUESIZE -gt $WARNING ]
then
echo "queuesize: WARNING Queue size: $QUEUESIZE"
exit 1
else
echo "queuesize: OK Queue size: $QUEUESIZE"
exit 0
fi

View file

@ -118,6 +118,7 @@
- check_datanommer_history.cfg
- check_memcache.cfg
- check_lock_file_age.cfg
- check_basset.cfg
- check_koschei_polling_proc.cfg
- check_koschei_resolver_proc.cfg
- check_koschei_scheduler_proc.cfg

View file

@ -0,0 +1,4 @@
command[check_mongo_proc]={{ libdir }}/nagios/plugins/check_procs -s RSD -u mongodb -C mongod -c 1:1
command[check_rabbitmq_proc]={{ libdir }}/nagios/plugins/check_procs -s RSD -u rabbitmq -C beam.smp -c 1:1
command[check_worker_proc]={{ libdir }}/nagios/plugins/check_procs -s RSD -u basset-worker -C basset-worker -c 1:1
command[check_basset_queue]={{ libdir }}/nagios/plugins/checkrabbitmq_size check_submission

View file

@ -0,0 +1,7 @@
define host {
host_name basset01
alias basset01.phx2.fedoraproject.org
use defaulttemplate
address basset01.phx2.fedoraproject.org
parents virthost19
}

View file

@ -0,0 +1,27 @@
define service {
host_name baset01
service_description mongo process
check_command check_by_nrpe!check_mongo_proc
use defaulttemplate
}
define service {
host_name basset01
service_description rabbitmq process
check_command check_by_nrpe!check_rabbitmq_proc
use defaulttemplate
}
define service {
host_name basset01
service_description basset worker processes
check_command check_by_nrpe!check_worker_proc
use defaulttemplate
}
define service {
host_name basset01
service_description basset processing queue
check_command check_by_nrpe!check_basset_queue
use defaulttemplate
}