Module: check_mk
Branch: master
Commit: fc16cd5abfdbfa8d7759117fe0747a3b01b6dcea
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fc16cd5abfdbfa…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri May 18 12:59:18 2018 +0200
6085 FIX innovaphone_licenses: Do not discover if no data is sent by special agent
Change-Id: I228d2964055efbe76a1162d52eb12667834c9ad6
---
.werks/6085 | 10 ++++++++++
checks/innovaphone_licenses | 5 ++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/6085 b/.werks/6085
new file mode 100644
index 0000000..7ad1407
--- /dev/null
+++ b/.werks/6085
@@ -0,0 +1,10 @@
+Title: innovaphone_licenses: Do not discover if no data is sent by special agent
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1526641125
+Class: fix
+
+
diff --git a/checks/innovaphone_licenses b/checks/innovaphone_licenses
index 888f11c..cc81c52 100644
--- a/checks/innovaphone_licenses
+++ b/checks/innovaphone_licenses
@@ -29,10 +29,13 @@ innovaphone_licenses_default_levels = ( 90.0, 95.0 )
def inventory_innovaphone_licenses(info):
- return [ ( None, 'innovaphone_licenses_default_levels') ]
+ if info:
+ return [ ( None, 'innovaphone_licenses_default_levels') ]
def check_innovaphone_licenses(_no_item, params, info):
+ if not info:
+ return
total, used = map(savefloat, info[0])
perc_used = (100.0 * used) / total
warn, crit = params