Module: check_mk
Branch: master
Commit: 441417f9adcd0c163f51be8df26789dbbd6d8a53
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=441417f9adcd0c…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 7 15:04:56 2013 +0200
uptime: tolerate params of type None
---
checks/uptime.include | 3 +++
1 file changed, 3 insertions(+)
diff --git a/checks/uptime.include b/checks/uptime.include
index 2f2cd7d..1404750 100644
--- a/checks/uptime.include
+++ b/checks/uptime.include
@@ -42,6 +42,9 @@ def check_uptime_seconds(params, uptime):
state = 0
infotext = "up since %s (%dd %02d:%02d:%02d)" % (since, days, hours,
minutes, seconds)
+ if params == None: # legacy
+ params = {}
+
if "min" in params:
warn, crit = params["min"]
if uptime < crit: