mirror of
https://github.com/drewkerrigan/nagios-http-json.git
synced 2024-11-22 10:23:50 +01:00
Merge pull request #17 from billmoritz/metrics-fix
Return metrics no matter the result
This commit is contained in:
commit
ea7edf5d01
@ -263,9 +263,10 @@ if __name__ == "__main__":
|
|||||||
processor = JsonRuleProcessor(data, args)
|
processor = JsonRuleProcessor(data, args)
|
||||||
is_alive, reason = processor.isAlive()
|
is_alive, reason = processor.isAlive()
|
||||||
|
|
||||||
|
# Gather metrics for display
|
||||||
|
nagios.performance_data = processor.getMetrics()
|
||||||
|
|
||||||
if is_alive:
|
if is_alive:
|
||||||
# Rules all passed, attempt to get performance data
|
|
||||||
nagios.performance_data = processor.getMetrics()
|
|
||||||
nagios.ok("Status OK.")
|
nagios.ok("Status OK.")
|
||||||
else:
|
else:
|
||||||
nagios.warning("Status check failed, reason:%s" % reason)
|
nagios.warning("Status check failed, reason:%s" % reason)
|
||||||
|
Loading…
Reference in New Issue
Block a user