Module: check_mk
Branch: master
Commit: a56cec682f6f0a5fec9a492401f72e184c3361a2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a56cec682f6f0a…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon May 2 18:13:05 2016 +0200
fixed perfdata if no upper levels are given
---
checks/elphase.include | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/checks/elphase.include b/checks/elphase.include
index 86979e9..2d6495b 100644
--- a/checks/elphase.include
+++ b/checks/elphase.include
@@ -70,6 +70,7 @@ def check_elphase(item, params, parsed):
infotext = "%s: %s%s" % (title, tostring(value), unit)
status = 0
+ perfdata = [ (what, value * factor) ]
if what in params:
warn_lower = crit_lower = warn = crit = None
@@ -100,10 +101,7 @@ def check_elphase(item, params, parsed):
status = max(status, 1)
infotext += levelstext
- perfdata = [ (what, value * factor, warn * factor, crit * factor) ]
-
- else:
- perfdata = [ (what, value * factor) ]
+ perfdata = [ (what, value * factor, warn * factor, crit * factor) ]
yield status, infotext, perfdata