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