put in the first run at new nagios configs

This commit is contained in:
Stephen Smoogen 2017-01-05 00:55:16 +00:00
parent a1957d29d4
commit 8cf72ff116
310 changed files with 13255 additions and 26 deletions

View file

@ -0,0 +1,23 @@
#!/usr/bin/python
import subprocess
import sys
sp = subprocess.Popen(
["osbs", "list-builds"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
stdin=subprocess.PIPE
)
sp_out, sp_err = sp.communicate()
sp_err = sp_err.split('\n')
if 'not attached to terminal' in sp_err[0]:
sp_err = sp_err[1:]
if sp_err[0].split()[0] == 'BUILD':
print "OK: OSBS is responsive to 'osbs list-builds'"
sys.exit(0)
else:
print "CRITICAL: OSBS UNRESPONSIVE"
sys.exit(2)