diff --git a/nagixsc/__init__.py b/nagixsc/__init__.py
index 2a93b864f6315de3a0c7bbc53a506d861962c831..85f39092a13ab1e105e002bd172e1293b15ebc41 100644 (file)
--- a/nagixsc/__init__.py
+++ b/nagixsc/__init__.py
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')
def write_xml_or_die(xmldoc, outfile, httpuser=None, httppasswd=None):
try:
- response = write_xml(xmldoc, outfile, httpuser=None, httppasswd=None)
+ response = write_xml(xmldoc, outfile, httpuser, httppasswd)
except urllib2.HTTPError, error:
print error
sys.exit(11)