summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 69d197d)
raw | patch | inline | side by side (parent: 69d197d)
author | Sven Velt <sven@velt.de> | |
Fri, 15 Oct 2010 08:33:40 +0000 (10:33 +0200) | ||
committer | Sven Velt <sven@velt.de> | |
Fri, 15 Oct 2010 08:33:40 +0000 (10:33 +0200) |
Signed-off-by: Sven Velt <sven@velt.de>
obsess_daemon.py | patch | blob | history |
diff --git a/obsess_daemon.py b/obsess_daemon.py
index 01021a4ce8a736f0c3e15f4c252a164cf3dd3a6a..06da3fe51108a529e8f53ed6cf527aa401d238cb 100755 (executable)
--- a/obsess_daemon.py
+++ b/obsess_daemon.py
checks = []
f = open(filename)
print 'Read ' + filename
+ count_lines = 0
for line in f:
if line.startswith('LASTSERVICECHECK'):
checks.append({'host_name':m.group(2), 'service_description':None, 'returncode':m.group(3), 'output':'\n'.join(m.group(4,5)), 'timestamp':m.group(1)})
else:
print 'FAIL: ' + line
+ count_lines += 1
+ print "Read %s lines" % count_lines
f.close()
return checks
if len(sys.argv) != 4:
print 'Please call script as: "%s http://SERVER:PORT/ username password"\n' % sys.argv[0]
- print '... with "http://SERVER:PORT/" your conf2http-URL'
+ print '... with "http://SERVER:PORT/" your http2nagios-URL'
print '... and "username"/"password" authentication data for it'
sys.exit(1)