Code

Filter out host check if -D specified
[nagixsc.git] / nagixsc / __init__.py
index 54a2125519fb1b8dd86d7c1ded8af7cf140dd38a..ba961828b503887a2513e6f48d3295c8526eae68 100644 (file)
@@ -306,7 +306,8 @@ def xml_to_dict(xmldoc, verb=0, hostfilter=None, servicefilter=None):
                else:
                        timestamp = filetimestamp
 
-               if retcode and output:
+               # Append only if no service filter
+               if not servicefilter and retcode and output:
                        checks.append({'host_name':hostname, 'service_description':None, 'returncode':retcode, 'output':output, 'timestamp':timestamp})