projects
/
mirror
/
dsa-nagios.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
barriere on wheezy
[mirror/dsa-nagios.git]
/
dsa-nagios-checks
/
checks
/
dsa-check-statusfile
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'])
print "UNKNOWN: %s has invalid return value: %s."%(statusfile, returnvalue)
sys.exit(NAGIOS_STATUS['UNKNOWN'])
+linecnt = 0
for line in status:
print line,
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:
sys.exit(NAGIOS_STATUS[returnvalue])
# vim:set et: