From 0efffc00d17d624f8c4e61992883bf25d49ed0af Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Fri, 19 Nov 2010 11:39:17 +0100 Subject: [PATCH] Correct timestamps of passive service Old: Use "now" New: Use timestamp of service or xml file Signed-off-by: Sven Velt --- nagixsc/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nagixsc/__init__.py b/nagixsc/__init__.py index c58f54d..f379765 100644 --- a/nagixsc/__init__.py +++ b/nagixsc/__init__.py @@ -198,10 +198,10 @@ def dict2out_passive(checks, xmltimestamp, opt_pipe, opt_verb=0): if check['service_description'] == None or check['service_description'] == '': # Host check - line = FORMAT_HOST % (now, check['host_name'], check['returncode'], check['output'].replace('\n', '\\n')) + line = FORMAT_HOST % (timestamp, check['host_name'], check['returncode'], check['output'].replace('\n', '\\n')) else: # Service check - line = FORMAT_SERVICE % (now, check['host_name'], check['service_description'], check['returncode'], check['output'].replace('\n', '\\n')) + line = FORMAT_SERVICE % (timestamp, check['host_name'], check['service_description'], check['returncode'], check['output'].replace('\n', '\\n')) if pipe: pipe.write(line + '\n') @@ -541,7 +541,7 @@ def daemonize(pidfile=None, stdin='/dev/null', stdout='/dev/null', stderr='/dev/ ############################################################################## -class MyHTTPServer(SocketServer.ForkingMixIn, BaseHTTPServer.HTTPServer): +class MyHTTPServer(BaseHTTPServer.HTTPServer): def __init__(self, server_address, HandlerClass, ssl=False, sslpemfile=None): if ssl: # FIXME: SSL is in Py2.6 -- 2.30.2