projects
/
mirror
/
dsa-nagios.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d83d9af
)
this is probably a hack
author
Stephen Gran
<steve@lobefin.net>
Sun, 15 Jul 2012 16:31:57 +0000
(17:31 +0100)
committer
Stephen Gran
<steve@lobefin.net>
Sun, 15 Jul 2012 16:31:57 +0000
(17:31 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
dsa-nagios-checks/checks/dsa-check-statusfile
patch
|
blob
|
history
diff --git
a/dsa-nagios-checks/checks/dsa-check-statusfile
b/dsa-nagios-checks/checks/dsa-check-statusfile
index
6ca691d
..
4654731
100755
(executable)
--- a/
dsa-nagios-checks/checks/dsa-check-statusfile
+++ b/
dsa-nagios-checks/checks/dsa-check-statusfile
@@
-74,8
+74,15
@@
if not returnvalue in NAGIOS_STATUS:
print "UNKNOWN: %s has invalid return value: %s."%(statusfile, returnvalue)
sys.exit(NAGIOS_STATUS['UNKNOWN'])
+linecnt = 0
for line in status:
print line,
+ linecnt += 1
+
+if linecnt == 0:
+ print "Found no output. Something is probably wrong"
+ sys.exit(NAGIOS_STATUS['UNKNOWN'])
+
sys.exit(NAGIOS_STATUS[returnvalue])
# vim:set et: