Module: check_mk
Branch: master
Commit: 2202283d5a915f69feb39d2d291e768f1ba09a8f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2202283d5a915f…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Mon Jun 26 15:49:36 2017 +0200
4826 FIX juniper_cpu_util: No crash anymore if information is not provided
Change-Id: Icecda56d0f5fd9bdbc355869342add7ea1069171
---
.werks/4826 | 10 ++++++++++
checks/juniper_cpu_util | 2 ++
2 files changed, 12 insertions(+)
diff --git a/.werks/4826 b/.werks/4826
new file mode 100644
index 0000000..cca0644
--- /dev/null
+++ b/.werks/4826
@@ -0,0 +1,10 @@
+Title: juniper_cpu_util: No crash anymore if information is not provided
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1498484944
+Class: fix
+
+
diff --git a/checks/juniper_cpu_util b/checks/juniper_cpu_util
index 3d1a51a..a513a46 100644
--- a/checks/juniper_cpu_util
+++ b/checks/juniper_cpu_util
@@ -37,6 +37,8 @@ def check_juniper_cpu_util(item, params, info):
for name, util in info:
if name == item:
+ if util == "":
+ return 3, "Information not available"
return check_cpu_util(int(util), params)