Module: check_mk
Branch: master
Commit: 3be3abcfc2c87ad018b8302e806ff0b4ebd9c0a1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3be3abcfc2c87a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 6 08:37:32 2017 +0200
Updated bug entries #2938
Change-Id: I8cca54e9b16e5df8fb2a7fba0b030cc20a88a8c0
---
.bugs/2938 | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/.bugs/2938 b/.bugs/2938
index 9f20ff3..214be34 100644
--- a/.bugs/2938
+++ b/.bugs/2938
@@ -1,9 +1,9 @@
Title: Automatic baking agents options breaks activation of changes in distributed setups
Component: wato
-State: open
+Class: bug
+State: done
Date: 2017-07-18 18:43:49
Targetversion: 1.2.8
-Class: bug
If the option autimatic bake agents is activated in distributed setups,
the agents will be build on slave sites. That will break the activation of
@@ -12,3 +12,9 @@ changes on thsi slave site.
This option should only applied to the master site and have to be ignored on slave sites.
Workaround: Deactivate this option again.
+
+2017-09-06 08:37:30: changed state open -> done
+Fixed for 1.4.0 and master.
+
+For 1.2.8 use the workaround to either disable this option at all or
+disable the option in the site specific global settings for the slave sites.
Module: check_mk
Branch: master
Commit: b0ae55862e694d25366bded09f1f6306b8dde5c7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b0ae55862e694d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 6 14:49:00 2017 +0200
5185 FIX Check_MK HW/SW Inventory: The service was executed too often by default
Issue: The HW/SW inventory may produce a lot of load because of wrong scheduling.
You may be affected by this bug in case you created your (master) site with 1.4.0b1
or newer. If you updated your site from older versions you are likely not affected.
Slave sites that get their configuration from a master that is not affected will also
not be affected, regardless of the version they were created with.
When using the hardware software inventory the regular check "Check_MK HW/SW Inventory"
on each host is executed too often by default. The expected behaviour is that the regular
check interval of this service is 1 day. The bug we fixed now made the check being executed
once a minute. In case you have the HW/SW inventory enabled for a lot of hosts, this could
lead to significant load on your Check_MK server.
Whether or not you have this issue can be checked on the "service detail" page of the
"Check_MK HW/SW Inventory" service. Have a look at the "Service normal/retry check interval"
column where you should see 86400s as first value (-> 1 day). If you see a value of 60s, you
should fix the issue as follows.
<ul>
<li>Navigate to "WATO > Host & Service parameters > Monitoring configuration > Normal check
interval for service checks".</li>
<li>Create a new rule with the following settings:</li>
<li>Description: Restrict HW/SW-Inventory to once a day</li>
<li>Value: 1 day</li>
<li>Services: <tt>Check_MK HW/SW Inventory$</tt></li>
<li>Activate the changes via WATO</li>
<li>
After this you should check the service detail page again and see the 86400s interval.
Even when you update your existing site to 1.4.0p11 or newer, you will have to apply the fix
manually to existing installations when your installation is affected.
Sites created with 1.4.0p11 or newer won't be affected.
Change-Id: Iaf50c46d1c92a73e0051e35b1bba54508eab51f6
---
.werks/5185 | 43 +++++++++++++++++++++++++++++++++++++++++++
web/htdocs/wato.py | 8 +++++---
2 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/.werks/5185 b/.werks/5185
new file mode 100644
index 0000000..24a4591
--- /dev/null
+++ b/.werks/5185
@@ -0,0 +1,43 @@
+Title: Check_MK HW/SW Inventory: The service was executed too often by default
+Level: 2
+Component: inv
+Class: fix
+Compatible: incomp
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1504701323
+
+Issue: The HW/SW inventory may produce a lot of load because of wrong scheduling.
+
+You may be affected by this bug in case you created your (master) site with 1.4.0b1
+or newer. If you updated your site from older versions you are likely not affected.
+Slave sites that get their configuration from a master that is not affected will also
+not be affected, regardless of the version they were created with.
+
+When using the hardware software inventory the regular check "Check_MK HW/SW Inventory"
+on each host is executed too often by default. The expected behaviour is that the regular
+check interval of this service is 1 day. The bug we fixed now made the check being executed
+once a minute. In case you have the HW/SW inventory enabled for a lot of hosts, this could
+lead to significant load on your Check_MK server.
+
+Whether or not you have this issue can be checked on the "service detail" page of the
+"Check_MK HW/SW Inventory" service. Have a look at the "Service normal/retry check interval"
+column where you should see 86400s as first value (-> 1 day). If you see a value of 60s, you
+should fix the issue as follows.
+
+<ul>
+<li>Navigate to "WATO > Host & Service parameters > Monitoring configuration > Normal check
+interval for service checks".</li>
+<li>Create a new rule with the following settings:</li>
+<li>Description: Restrict HW/SW-Inventory to once a day</li>
+<li>Value: 1 day</li>
+<li>Services: <tt>Check_MK HW/SW Inventory$</tt></li>
+<li>Activate the changes via WATO</li>
+<li>
+
+After this you should check the service detail page again and see the 86400s interval.
+
+Even when you update your existing site to 1.4.0p11 or newer, you will have to apply the fix
+manually to existing installations when your installation is affected.
+Sites created with 1.4.0p11 or newer won't be affected.
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 08ffc9c..7501ad1 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -14765,9 +14765,11 @@ def create_sample_config():
],
# Interval for HW/SW-Inventory check
- 'extra_service_conf:check_interval': [
- ( 1440, [], ALL_HOSTS, [ "Check_MK HW/SW Inventory$" ], {'description': u'Restrict HW/SW-Inventory to once a day'} ),
- ],
+ 'extra_service_conf': {
+ 'check_interval': [
+ ( 1440, [], ALL_HOSTS, [ "Check_MK HW/SW Inventory$" ], {'description': u'Restrict HW/SW-Inventory to once a day'} ),
+ ],
+ },
# Periodic service discovery
'periodic_discovery': [
Module: check_mk
Branch: master
Commit: 7fedcb2c0978bd7a35a1e4bf583cc70e77165353
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7fedcb2c0978bd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 6 08:13:39 2017 +0200
5184 FIX Bake agents on restart only affects master sites now
When enabling the global setting for baking agents during restrt of the
monitoring core, the agents were baked on all sites in distributed setups.
Since the agents are only deployed from the master site, the setting is
now only affecting the master.
Change-Id: Ia1fdfd324107ed9c395304b6e8d4fc6ee6a32f70
---
.werks/5184 | 13 +++++++++++++
cmk_base/default_config/base.py | 1 +
web/htdocs/watolib.py | 7 ++++---
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/.werks/5184 b/.werks/5184
new file mode 100644
index 0000000..9e61c50
--- /dev/null
+++ b/.werks/5184
@@ -0,0 +1,13 @@
+Title: Bake agents on restart only affects master sites now
+Level: 1
+Component: agents
+Compatible: compat
+Edition: cee
+Version: 1.5.0i1
+Date: 1504678337
+Class: fix
+
+When enabling the global setting for baking agents during restrt of the
+monitoring core, the agents were baked on all sites in distributed setups.
+Since the agents are only deployed from the master site, the setting is
+now only affecting the master.
diff --git a/cmk_base/default_config/base.py b/cmk_base/default_config/base.py
index e78b6b9..3d64f51 100644
--- a/cmk_base/default_config/base.py
+++ b/cmk_base/default_config/base.py
@@ -160,6 +160,7 @@ ipaddresses = {} # mapping from hostname to IPv4 addres
ipv6addresses = {} # mapping from hostname to IPv6 address
only_hosts = None
distributed_wato_site = None # used by distributed WATO
+is_wato_slave_site = False
extra_host_conf = {}
extra_service_conf = {}
extra_nagios_conf = ""
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 9f24526..ae05ecb 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -3958,12 +3958,13 @@ def create_nagvis_backends(sites):
store.save_file('%s/etc/nagvis/conf.d/cmk_backends.ini.php' % cmk.paths.omd_root, '\n'.join(cfg))
-def create_distributed_wato_file(siteid):
+def create_distributed_wato_file(siteid, is_slave):
output = wato_fileheader()
output += ("# This file has been created by the master site\n"
"# push the configuration to us. It makes sure that\n"
"# we only monitor hosts that are assigned to our site.\n\n")
output += "distributed_wato_site = '%s'\n" % siteid
+ output += "is_wato_slave_site = %r\n" % is_slave
store.save_file(cmk.paths.check_mk_config_dir + "/distributed_wato.mk", output)
@@ -3996,7 +3997,7 @@ def update_distributed_wato_file(sites):
distributed = True
if config.site_is_local(siteid):
found_local = True
- create_distributed_wato_file(siteid)
+ create_distributed_wato_file(siteid, is_slave=False)
# Remove the distributed wato file
# a) If there is no distributed WATO setup
@@ -4302,7 +4303,7 @@ def automation_push_snapshot():
call_hook_snapshot_pushed()
# Create rule making this site only monitor our hosts
- create_distributed_wato_file(site_id)
+ create_distributed_wato_file(site_id, is_slave=True)
except Exception, e:
raise MKGeneralException(_("Failed to deploy configuration: \"%s\". "
"Please note that the site configuration has been synchronized "
Module: check_mk
Branch: master
Commit: 165e070c571ab525e4553083783c26d08bfde676
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=165e070c571ab5…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Sep 5 15:44:39 2017 +0200
Timeperiod valuespec: Fixed exception on some WATO rules
Change-Id: I0892a1b000bbe88a5547848c9eec232a8f89cf74
---
web/htdocs/valuespec.py | 44 ++++++++++++++++++++++++--------------------
1 file changed, 24 insertions(+), 20 deletions(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 8a8f283..b3397a1 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -4546,9 +4546,13 @@ class TimeperiodSelection(ElementSelection):
class TimeperiodValuespec(ValueSpec):
- tp_toggle_var = "tp_enabled" # Used by GUI switch
- tp_default_value_key = "tp_default_value" # Used in value
- tp_values_key = "tp_values" # Used in value
+ tp_toggle_var = "tp_toggle" # Used by GUI switch
+ tp_current_mode = "tp_active" # The actual set mode
+ # "0" - no timespecific settings
+ # "1" - timespecific settings active
+
+ tp_default_value_key = "tp_default_value" # Used in valuespec
+ tp_values_key = "tp_values" # Used in valuespec
def __init__(self, valuespec):
@@ -4568,18 +4572,20 @@ class TimeperiodValuespec(ValueSpec):
# The display mode differs when the valuespec is activated
vars_copy = html.vars.copy()
+
+ # The timeperiod mode can be set by either the GUI switch or by the value itself
# GUI switch overrules the information stored in the value
if html.has_var(self.tp_toggle_var):
is_active = self._is_switched_on()
else:
is_active = self._is_active(value)
- if is_active:
- mode = _("Disable")
- vars_copy[self.tp_toggle_var] = "0"
- else:
- mode = _("Enable")
- vars_copy[self.tp_toggle_var] = "1"
+ # Set the actual used mode
+ html.hidden_field(self.tp_current_mode, "%d" % is_active)
+
+ mode = _("Disable") if is_active else _("Enable")
+ vars_copy[self.tp_toggle_var] = "%d" % (not is_active)
+
toggle_url = html.makeuri(vars_copy.items())
html.buttonlink(toggle_url, _("%s timespecific parameters") % mode, style=["position: absolute", "right: 18px;"])
@@ -4602,18 +4608,16 @@ class TimeperiodValuespec(ValueSpec):
def from_html_vars(self, varprefix):
- parameters = self._get_timeperiod_valuespec().from_html_vars(varprefix)
-
- if parameters[self.tp_values_key]:
- return parameters
- elif parameters[self.tp_default_value_key]:
- # If the tp_default_value has any meaningful set, return this
- return parameters[self.tp_default_value_key]
+ if html.var(self.tp_current_mode) == "1":
+ # Fetch the timespecific settings
+ parameters = self._get_timeperiod_valuespec().from_html_vars(varprefix)
+ if parameters[self.tp_values_key]:
+ return parameters
+ else:
+ # Fall back to enclosed valuespec data when no timeperiod is set
+ return parameters[self.tp_default_value_key]
else:
- # -> Fall back to simple mode
- # If the tp-valuespec provided no data, it may be really empty, or we simply used the wrong valuespec
- # to collect the data. Try to fetch the data with the enclosed valuespec
- # If the second collection result is also empty - no problem, they have the same datatype
+ # Fetch the data from the enclosed valuespec
return self._enclosed_valuespec.from_html_vars(varprefix)
Module: check_mk
Branch: master
Commit: f8516e3da3b1e4c6310c8c2be065cf3d8a458e8e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f8516e3da3b1e4…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Sep 5 11:42:09 2017 +0200
5188 Sending service metrics to Graphite/InfluxDB can now be fine-tuned
Previously, there was a service rule to configure one of three levels of
information to be sent to Graphite/InfluxDB: Send nothing, send only value,
or send value/warn/crit/min/max.
Now the rule is more fine-grained, so one can choose for each part of the
metric if it should be sent or not. Furthermore, one can now send the unity
of measurement, too.
Change-Id: Ibc75ed41a256768e5f46674aff15f2be75db4aab
---
.werks/5188 | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/.werks/5188 b/.werks/5188
new file mode 100644
index 0000000..e58ecd8
--- /dev/null
+++ b/.werks/5188
@@ -0,0 +1,16 @@
+Title: Sending service metrics to Graphite/InfluxDB can now be fine-tuned
+Level: 2
+Component: core
+Compatible: compat
+Edition: cee
+Version: 1.5.0i1
+Date: 1504617495
+Class: feature
+
+Previously, there was a service rule to configure one of three levels of
+information to be sent to Graphite/InfluxDB: Send nothing, send only value,
+or send value/warn/crit/min/max.
+
+Now the rule is more fine-grained, so one can choose for each part of the
+metric if it should be sent or not. Furthermore, one can now send the unity
+of measurement, too.