Add basset monitoring
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
5e4522ca7b
commit
bab7a6a286
5 changed files with 61 additions and 0 deletions
22
roles/nagios/client/files/scripts/check_rabbitmq_size
Normal file
22
roles/nagios/client/files/scripts/check_rabbitmq_size
Normal 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
|
|
@ -118,6 +118,7 @@
|
||||||
- check_datanommer_history.cfg
|
- check_datanommer_history.cfg
|
||||||
- check_memcache.cfg
|
- check_memcache.cfg
|
||||||
- check_lock_file_age.cfg
|
- check_lock_file_age.cfg
|
||||||
|
- check_basset.cfg
|
||||||
- check_koschei_polling_proc.cfg
|
- check_koschei_polling_proc.cfg
|
||||||
- check_koschei_resolver_proc.cfg
|
- check_koschei_resolver_proc.cfg
|
||||||
- check_koschei_scheduler_proc.cfg
|
- check_koschei_scheduler_proc.cfg
|
||||||
|
|
4
roles/nagios/client/templates/check_basset.cfg.j2
Normal file
4
roles/nagios/client/templates/check_basset.cfg.j2
Normal 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
|
7
roles/nagios/server/files/nagios/hosts/basset01.cfg
Normal file
7
roles/nagios/server/files/nagios/hosts/basset01.cfg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
define host {
|
||||||
|
host_name basset01
|
||||||
|
alias basset01.phx2.fedoraproject.org
|
||||||
|
use defaulttemplate
|
||||||
|
address basset01.phx2.fedoraproject.org
|
||||||
|
parents virthost19
|
||||||
|
}
|
27
roles/nagios/server/files/nagios/services/basset.cfg
Normal file
27
roles/nagios/server/files/nagios/services/basset.cfg
Normal 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
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue