Module: check_mk
Branch: master
Commit: 19248c4fe5cf665e64b6c12fd8ba24731f86f47a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=19248c4fe5cf66…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 1 13:29:36 2014 +0100
#1556 FIX: WATO inventory ignores already inventorized checks which does not exist
anymore
---
.bugs/2142 | 7 +++++--
.werks/1556 | 12 ++++++++++++
ChangeLog | 1 +
modules/automation.py | 3 +++
4 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/.bugs/2142 b/.bugs/2142
index 58418a1..add15db 100644
--- a/.bugs/2142
+++ b/.bugs/2142
@@ -1,12 +1,15 @@
Title: Inventory via WATO fails if checks are missing
Component: wato
-State: open
+Class: bug
+State: done
Date: 2014-01-16 17:29:54
Targetversion: 1.2.5i1
-Class: bug
Inventorized Fritzbox-1und1
Failed to inventorize Fritzbox-Alt: 'fritz.uptime'
That was because that check was missing. An cmk -II on the commanline could fix it.
A WATO Inventory should simply ignore such problems.
+
+2014-12-01 12:13:11: changed state open -> done
+Fixed.
diff --git a/.werks/1556 b/.werks/1556
new file mode 100644
index 0000000..2c4a5f7
--- /dev/null
+++ b/.werks/1556
@@ -0,0 +1,12 @@
+Title: WATO inventory ignores already inventorized checks which does not exist anymore
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417432395
+Class: fix
+
+Previous versions totally failed to inventorize when a host already has a service
+inventorized which belongs to a check which is not existant anymore. It terminated
+with "Failed to inventorize Fritzbox-Alt: 'fritz.uptime'". This error
is skipped over
+now by simply ignoring the check.
diff --git a/ChangeLog b/ChangeLog
index c009d79..527d7ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -102,6 +102,7 @@
* 1541 FIX: Fixed missing form fields for notification method when editing rbn
default rule
* 1542 FIX: Changed text of "debug_log" option to be clearer in distributed
setups...
* 1546 FIX: Fixed adding cluster nodes to new cluster in complain phase...
+ * 1556 FIX: WATO inventory ignores already inventorized checks which does not exist
anymore...
Notifications:
* 1512 Bulk notification can now be grouped according to custom macro values...
diff --git a/modules/automation.py b/modules/automation.py
index 4a84981..61e3207 100644
--- a/modules/automation.py
+++ b/modules/automation.py
@@ -353,6 +353,9 @@ def automation_try_inventory_node(hostname, leave_no_tcp=False,
with_snmp_scan=F
opt_no_tcp = True
opt_dont_submit = True
+ if ct not in check_info:
+ continue # Skip not existing check silently
+
try:
exitcode = None
perfdata = []