Module: check_mk
Branch: master
Commit: c5c45f4c558adde3a1fa8168bc322b857eef6d96
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c5c45f4c558add…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jan 12 14:27:25 2016 +0100
Updated bug entries #2418
---
.bugs/2418 | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/.bugs/2418 b/.bugs/2418
new file mode 100644
index 0000000..0d93e47
--- /dev/null
+++ b/.bugs/2418
@@ -0,0 +1,18 @@
+Title: Replace factory_settings[] and ..._default_levels with "default_params" in check_info
+Component: core
+State: open
+Date: 2016-01-12 14:25:05
+Targetversion: future
+Class: todo
+
+We can now remove the ..._default_levels in the checks because almost no
+one uses them in main.mk manually. WATO does not need them. So rather
+introduce a new optional key default_params in check_info["foo"] for setting
+default params.
+
+If the type of those is dict, then merging takes place and the discovery
+function must return a dict as params.
+
+If the type is not dict, then not merging takes place in the discovery
+function can return None -> default params are being used, or any other
+value -> that is being used.
Module: check_mk
Branch: master
Commit: 12d6172cafda8a73856b436fd716532bddd8afa2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=12d6172cafda8a…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jan 13 10:35:33 2016 +0100
#2825 FIX Parameter overview page no longer raises an exception in certain scenarios
The parameter overview page raised an exception when the host in question never
got a service discovery and had an active check configured.
It also crashed for any "Classical active and passive Monitoring checks" check
with configured rule options, e.g a comment was set or the rule was deactivated.
---
.werks/2825 | 13 +++++++++++
ChangeLog | 1 +
modules/automation.py | 59 +++++++++++++++++++++++++++----------------------
3 files changed, 47 insertions(+), 26 deletions(-)
diff --git a/.werks/2825 b/.werks/2825
new file mode 100644
index 0000000..b97cc30
--- /dev/null
+++ b/.werks/2825
@@ -0,0 +1,13 @@
+Title: Parameter overview page no longer raises an exception in certain scenarios
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.7i4
+Date: 1452677246
+Class: fix
+
+The parameter overview page raised an exception when the host in question never
+got a service discovery and had an active check configured.
+
+It also crashed for any "Classical active and passive Monitoring checks" check
+with configured rule options, e.g a comment was set or the rule was deactivated.
diff --git a/ChangeLog b/ChangeLog
index 32c20d9..28e5c20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -238,6 +238,7 @@
* 2793 FIX: Parameter Overview: Prevent python unicode warnings for services with umlauts...
* 2845 FIX: LDAP: Fixed exception in connection test on complain issue during connection creation
* 2779 FIX: Fix moving of folders...
+ * 2825 FIX: Parameter overview page no longer raises an exception in certain scenarios...
Notifications:
* 2811 Mail notifications: Now able to add Host/Service Notes Url...
diff --git a/modules/automation.py b/modules/automation.py
index 84d9420..1944d3d 100644
--- a/modules/automation.py
+++ b/modules/automation.py
@@ -309,39 +309,46 @@ def automation_analyse_service(args):
# our service there
try:
path = "%s/%s.mk" % (autochecksdir, hostname)
- for entry in eval(file(path).read()):
- if len(entry) == 4: # old format
- hn, ct, item, params = entry
- else:
- ct, item, params = entry # new format without host name
- hn = hostname
-
- if (ct, item) not in check_table:
- continue # this is a removed duplicate or clustered service
- descr = service_description(ct, item)
- if hn == hostname and descr == servicedesc:
- dlv = check_info[ct].get("default_levels_variable")
- if dlv:
- fs = factory_settings.get(dlv, None)
+ if os.path.exists(path):
+ for entry in eval(file(path).read()):
+ if len(entry) == 4: # old format
+ hn, ct, item, params = entry
else:
- fs = None
-
- return {
- "origin" : "auto",
- "checktype" : ct,
- "checkgroup" : check_info[ct].get("group"),
- "item" : item,
- "inv_parameters" : params,
- "factory_settings" : fs,
- "parameters" : compute_check_parameters(hostname, ct, item, params),
- }
+ ct, item, params = entry # new format without host name
+ hn = hostname
+
+ if (ct, item) not in check_table:
+ continue # this is a removed duplicate or clustered service
+ descr = service_description(ct, item)
+ if hn == hostname and descr == servicedesc:
+ dlv = check_info[ct].get("default_levels_variable")
+ if dlv:
+ fs = factory_settings.get(dlv, None)
+ else:
+ fs = None
+
+ return {
+ "origin" : "auto",
+ "checktype" : ct,
+ "checkgroup" : check_info[ct].get("group"),
+ "item" : item,
+ "inv_parameters" : params,
+ "factory_settings" : fs,
+ "parameters" : compute_check_parameters(hostname, ct, item, params),
+ }
except:
if opt_debug:
raise
# 3. Classical checks
for nr, entry in enumerate(custom_checks):
- rule, tags, hosts = entry
+ if len(entry) == 4:
+ rule, tags, hosts, options = entry
+ if options.get("disabled"):
+ continue
+ else:
+ rule, tags, hosts = entry
+
matching_hosts = all_matching_hosts(tags, hosts, with_foreign_hosts = True)
if hostname in matching_hosts:
desc = rule["service_description"]
Module: check_mk
Branch: master
Commit: fe67df25c0a37604faaf5e2591ac17602b01e935
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fe67df25c0a376…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 13 10:11:48 2016 +0100
#2900 Bulk Host import can now handle CSV files including several host attributes
The Bulk Host Import feature of WATO could be used for importing a list of host names
before. But more complex imports like adding hosts together with a collection of initial
attributes was not possible.
The import has now been extended that one can upload whole CSV files or paste the contents
of a CSV file into a form. Then, after the upload, a preview page is displayed to configure
the parameters how to parse the CSV file and which column to assign to which host attribute.
---
.werks/2900 | 15 ++
ChangeLog | 1 +
web/htdocs/valuespec.py | 30 +++
web/htdocs/wato.py | 512 ++++++++++++++++++++++++++++++++++-------------
4 files changed, 416 insertions(+), 142 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=fe67df25c0…