Return metrics no matter the result

This commit is contained in:
Bill Moritz 2015-08-31 11:36:27 -04:00
parent cb0a5927c2
commit a4be4d42c6

View File

@ -263,9 +263,10 @@ if __name__ == "__main__":
processor = JsonRuleProcessor(data, args)
is_alive, reason = processor.isAlive()
if is_alive:
# Rules all passed, attempt to get performance data
# Gather metrics for display
nagios.performance_data = processor.getMetrics()
if is_alive:
nagios.ok("Status OK.")
else:
nagios.warning("Status check failed, reason:%s" % reason)