Add some nagios client configuration for the new packages03,4 nodes.
This commit is contained in:
parent
08f98b1159
commit
ab1e54e54c
5 changed files with 30 additions and 0 deletions
23
roles/nagios_client/files/scripts/check_fcomm_queue
Normal file
23
roles/nagios_client/files/scripts/check_fcomm_queue
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
|
||||
try:
|
||||
import retask.queue
|
||||
|
||||
queue = retask.queue.Queue('fedora-packages')
|
||||
queue.connect()
|
||||
|
||||
items = queue.length
|
||||
if items > 500:
|
||||
print "CRITICAL: %i tasks in fcomm queue" % items
|
||||
sys.exit(2)
|
||||
elif items > 250:
|
||||
print "WARNING: %i tasks in fcomm queue" % items
|
||||
sys.exit(1)
|
||||
else:
|
||||
print "OK: %i tasks in fcomm queue" % items
|
||||
sys.exit(0)
|
||||
|
||||
except Exception as e:
|
||||
print "UNKNOWN:", str(e)
|
||||
sys.exit(3)
|
|
@ -23,6 +23,7 @@
|
|||
- check_postfix_queue
|
||||
- check_raid.py
|
||||
- check_lock
|
||||
- check_fcomm_queue
|
||||
|
||||
# create dirs
|
||||
# puppet used to make /var/spool/nagios (owned by nagios.nagios) mode 750
|
||||
|
@ -57,6 +58,9 @@
|
|||
- check_postfix_queue.cfg
|
||||
- check_lock.cfg
|
||||
- check_fedmsg_hub_proc.cfg
|
||||
- check_redis_proc.cfg
|
||||
- check_fcomm_cache_worker_proc.cfg
|
||||
- check_fcomm_queue.cfg
|
||||
notify:
|
||||
- restart nrpe
|
||||
tags:
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
command[check_fcomm_cache_worker_proc]=/usr/lib/nagios/plugins/check_procs -c 1:1 -C 'fcomm-cache-wor' -u apache
|
1
roles/nagios_client/templates/check_fcomm_queue.cfg.j2
Normal file
1
roles/nagios_client/templates/check_fcomm_queue.cfg.j2
Normal file
|
@ -0,0 +1 @@
|
|||
command[check_fcomm_queue]=/usr/lib/nagios/plugins/check_fcomm_queue
|
1
roles/nagios_client/templates/check_redis_proc.cfg.j2
Normal file
1
roles/nagios_client/templates/check_redis_proc.cfg.j2
Normal file
|
@ -0,0 +1 @@
|
|||
command[check_redis_proc]=/usr/lib/nagios/plugins/check_procs -c 1:1 -C 'redis-server' -u redis
|
Loading…
Add table
Add a link
Reference in a new issue