[checkmk-commits] Check_MK Git: check_mk: apc_symmetra: Added warn/crit levels to perfdata

Konstantin Büttner kb at mathias-kettner.de
Thu Feb 26 14:15:08 CET 2015


Module: check_mk
Branch: master
Commit: 4f043227f07de9e8a310dea6ad97c6fcd7e3eda0
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4f043227f07de9e8a310dea6ad97c6fcd7e3eda0

Author: Konstantin Büttner <kb at mathias-kettner.de>
Date:   Thu Feb 26 14:15:04 2015 +0100

apc_symmetra: Added warn/crit levels to perfdata

---

 checks/apc_symmetra |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/checks/apc_symmetra b/checks/apc_symmetra
index 78d3986..f30a576 100644
--- a/checks/apc_symmetra
+++ b/checks/apc_symmetra
@@ -199,6 +199,7 @@ def check_apc(item, params, info):
     battime_state = 0
     hrs = int(RunTimeRemaining) / 3600
     mins, secs = divmod(int(RunTimeRemaining) % 3600, 60)
+    battime_warn, battime_crit = None, None
     label = ""
     if params.get('battime'):
         battime_warn, battime_crit = params['battime']
@@ -210,7 +211,7 @@ def check_apc(item, params, info):
             label = "(!)"
 
     single_states.append( (battime_state, "run time remaining: %02d:%02d:%02d%s" % (hrs, mins, secs, label),
-                            ("runtime", RunTimeRemaining/60)) )
+                            ("runtime", RunTimeRemaining/60, battime_warn, battime_crit)) )
 
     # 10. Adv Output load (load in percent)
     load_state = 0



More information about the checkmk-commits mailing list