Module: check_mk
Branch: master
Commit: 24fe8613712197feb624923ef24207e99b36211f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=24fe8613712197…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Jul 17 11:09:03 2017 +0200
added comment in check_mk.example.ini
Change-Id: If20047feefd979351ce75a20a31994d4279efd0d
---
agents/windows/check_mk.example.ini | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/agents/windows/check_mk.example.ini b/agents/windows/check_mk.example.ini
index eec9a51..94c01a8 100644
--- a/agents/windows/check_mk.example.ini
+++ b/agents/windows/check_mk.example.ini
@@ -141,6 +141,10 @@
# Run classical monitoring plugins. The word before the command
# line is the service description for the monitoring. Use backslashes
# in Windows-paths.
+ # Note: The windows agent will prefix all commands without an absolute
+ # path with the agents executable dir. So if you want to use
+ # system wide commands like cscript or ping, you need to specify
+ # them with an absolute path
# check = Dummy mrpe\check_crit
# check = IP_Configuration mrpe\check_ipconfig 1.2.3.4
# check = Whatever c:\myplugins\check_whatever -w 10 -c 20
Module: check_mk
Branch: master
Commit: cde5384212d70d2b1647ba3a4de3ac0101f0e171
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cde5384212d70d…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Jul 17 11:02:28 2017 +0200
4976 FIX wmi_cpuload: Fixed UNKNOWN service state due to werk #4742
Some agent outputs do not include required sections 'computer_system'
and 'system_perf' and werk #4742 fixed that. But if required tables
are specified the wmi.include lib performed an intersection of these
tables. In case of wmi_cpuload check plugin 'system_perf' section
has only counters and comes together with 'computer_system' which has
table names and intersection of these tables would be empty.
Thus no service is discovered.
Change-Id: I537810883c67f23849e0971b33d4371b65c2ba20
---
.werks/4976 | 17 +++++++++++++++++
checks/wmi.include | 36 +++++++++++++++++++++++-------------
checks/wmi_cpuload | 3 ++-
3 files changed, 42 insertions(+), 14 deletions(-)
diff --git a/.werks/4976 b/.werks/4976
new file mode 100644
index 0000000..ae8aafc
--- /dev/null
+++ b/.werks/4976
@@ -0,0 +1,17 @@
+Title: wmi_cpuload: Fixed UNKNOWN service state due to werk #4742
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1500281231
+
+Some agent outputs do not include required sections 'computer_system'
+and 'system_perf' and werk #4742 fixed that. But if required tables
+are specified the wmi.include lib performed an intersection of these
+tables. In case of wmi_cpuload check plugin 'system_perf' section
+has only counters and comes together with 'computer_system' which has
+table names and intersection of these tables would be empty.
+Thus no service is discovered.
diff --git a/checks/wmi.include b/checks/wmi.include
index da4c2e1..a87672c 100644
--- a/checks/wmi.include
+++ b/checks/wmi.include
@@ -207,20 +207,30 @@ def inventory_wmi_table(tables, **kwargs):
potential_instances = None
if isinstance(tables, dict):
- table_names = kwargs.get('required_tables', tables.keys())
-
- for table_name in table_names:
- if table_name not in tables:
- # if table is missing, nothing gets inventorized. This can
- # only happen if required_tables was set
- return []
-
+ required_tables = kwargs.get('required_tables', tables.keys())
+ if not set(required_tables) <= set(tables.keys()):
+ # if table is missing, nothing gets inventorized. This can
+ # only happen if required_tables was set
+ return []
+
+ if kwargs.get("skip_intersection", False):
+ # Unfortunately there are tables which do NOT provide any
+ # names. In this case we fallback to old behaviour.
+ #
+ # Eg. wmi_cpuload check plugin:
+ # 'system_perf' section has only counters and comes together
+ # with 'computer_system' which has table names and intersection
+ # of these tables would be empty. Thus no service is discovered.
+ potential_instances = [""]
+
+ else:
# inventarize one item per instance that exists in all tables
- table_rows = tables[table_name].row_labels()
- if potential_instances is None:
- potential_instances = set(table_rows)
- else:
- potential_instances &= set(table_rows)
+ for required_table in required_tables:
+ table_rows = tables[required_table].row_labels()
+ if potential_instances is None:
+ potential_instances = set(table_rows)
+ else:
+ potential_instances &= set(table_rows)
else:
potential_instances = tables.row_labels()
diff --git a/checks/wmi_cpuload b/checks/wmi_cpuload
index 954dce7..0a96466 100644
--- a/checks/wmi_cpuload
+++ b/checks/wmi_cpuload
@@ -27,7 +27,8 @@
def inventory_wmi_cpuload(parsed):
return inventory_wmi_table(parsed, \
- required_tables = [ "computer_system", "system_perf" ])
+ required_tables = [ "computer_system", "system_perf" ],
+ skip_intersection=True)
def check_wmi_cpuload(item, params, parsed):
Module: check_mk
Branch: master
Commit: ceb29ec8dd30bcba3a2d3bb673a8c7de8fc6ea9d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ceb29ec8dd30bc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jul 17 08:14:40 2017 +0200
Updated bug entries #2907
Change-Id: Ic5cfec89dce408ec6e9255ecb2df2615a7f0d94c
---
.bugs/2907 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.bugs/2907 b/.bugs/2907
index 41c6200..1044931 100644
--- a/.bugs/2907
+++ b/.bugs/2907
@@ -1,10 +1,13 @@
Title: Slave sites: Save site specific global settings in sitespecific.mk
Component: wato
-State: open
+Class: bug
+State: done
Date: 2017-06-14 10:00:17
Targetversion: 1.5.0
-Class: bug
This is an inconsistency between the master and the slave site. The slave site receives a sitespecfic.mk
in the sync snapshot and writes the config to the globals.mk. Instead it should save it in the sitespecific.mk
and show the site specific global settings button on the distributed monitoring page, just like on the master.
+
+2017-07-17 08:14:37: changed state open -> done
+Fixed.
Module: check_mk
Branch: master
Commit: 391df69d27f90cab56a84a439f22e4eadc092676
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=391df69d27f90c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jul 17 08:14:41 2017 +0200
Cleanup: Site specific globals are now stored in sitespecific.mk on slaves
Change-Id: I90bd75235cd4f420d7a07702d9e5b20ba7553d83
---
web/htdocs/wato.py | 27 +++++++++++++++++----------
web/htdocs/watolib.py | 19 ++++++++++++-------
2 files changed, 29 insertions(+), 17 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index c458be0..08bdca7 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9597,7 +9597,9 @@ class ModeDistributedMonitoring(ModeSites):
delete_url = html.makeactionuri([("_delete", site_id)])
html.icon_button(delete_url, _("Delete"), "delete")
- if has_wato_slave_sites() and (site.get("replication") or config.site_is_local(site_id)):
+ if (has_wato_slave_sites()
+ and (site.get("replication") or config.site_is_local(site_id))) \
+ or is_wato_slave_site():
globals_url = folder_preserving_link([("mode", "edit_site_globals"), ("site", site_id)])
html.icon_button(globals_url, _("Site specific global configuration"), "configuration")
@@ -9681,7 +9683,11 @@ class ModeEditSiteGlobals(ModeSites):
# The site's default values are the current global settings
self._default_values = check_mk_local_automation("get-configuration", [], get_check_mk_config_var_names())
self._default_values.update(load_configuration_settings())
- self._current_settings = self._site.get("globals", {})
+
+ if is_wato_slave_site():
+ self._current_settings = load_configuration_settings(site_specific=True)
+ else:
+ self._current_settings = self._site.get("globals", {})
def title(self):
@@ -9754,15 +9760,16 @@ class ModeEditSiteGlobals(ModeSites):
"on that site. <b>Note</b>: this only makes sense if the site "
"is part of a distributed setup."))
- if not has_wato_slave_sites():
- html.show_error(_("You can not configure site specific global settings "
- "in non distributed setups."))
- return
+ if not is_wato_slave_site():
+ if not has_wato_slave_sites():
+ html.show_error(_("You can not configure site specific global settings "
+ "in non distributed setups."))
+ return
- if not self._site.get("replication") and not config.site_is_local(self._site_id):
- html.show_error(_("This site is not the master site nor a replication slave. "
- "You cannot configure specific settings for it."))
- return
+ if not self._site.get("replication") and not config.site_is_local(self._site_id):
+ html.show_error(_("This site is not the master site nor a replication slave. "
+ "You cannot configure specific settings for it."))
+ return
group_names = global_config_variable_groups(show_all=True)
render_global_configuration_variables(group_names, self._default_values,
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index ea9116a..49150b5 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -313,8 +313,8 @@ class ConfigDomain(object):
raise MKGeneralException(_("The domain \"%s\" does not support activation.") % self.ident)
- def load(self):
- filename = self.config_file(site_specific=False)
+ def load(self, site_specific=False):
+ filename = self.config_file(site_specific)
settings = {}
if not os.path.exists(filename):
@@ -333,6 +333,10 @@ class ConfigDomain(object):
(filename, e))
+ def load_site_globals(self):
+ return self.load(site_specific=True)
+
+
def save(self, settings, site_specific=False):
filename = self.config_file(site_specific)
@@ -3408,10 +3412,13 @@ def register_configvar_group(title, order=None):
# - --> Wir machen eine automation, die alle Konfigurationsvariablen
# ausgibt
-def load_configuration_settings():
+def load_configuration_settings(site_specific=False):
settings = {}
for domain in ConfigDomain.enabled_domains():
- settings.update(domain().load())
+ if site_specific:
+ settings.update(domain().load_site_globals())
+ else:
+ settings.update(domain().load())
return settings
@@ -4167,9 +4174,7 @@ def save_site_globals_on_slave_site(tarcontent):
multitar.extract_from_buffer(tarcontent, [ ("dir", "sitespecific", tmp_dir) ])
site_globals = store.load_data_from_file(tmp_dir + "/sitespecific.mk", {})
- current_settings = load_configuration_settings()
- current_settings.update(site_globals)
- save_global_settings(current_settings)
+ save_site_global_settings(site_globals)
finally:
shutil.rmtree(tmp_dir)
Module: check_mk
Branch: master
Commit: 90529727ad13c59ee15fdcc86844f25df295a32d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=90529727ad13c5…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Jul 12 16:15:52 2017 +0200
4970 Reporting: Added the option "A heading for this graph element" to all graph elements
Change-Id: Ic67bc4bc138fd74665211d9f20846ff98c0455f1
---
.werks/4970 | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/.werks/4970 b/.werks/4970
new file mode 100644
index 0000000..b674f1a
--- /dev/null
+++ b/.werks/4970
@@ -0,0 +1,11 @@
+Title: Reporting: Heading of graph elements can now be customized
+Level: 1
+Component: reporting
+Compatible: compat
+Edition: cee
+Version: 1.5.0i1
+Date: 1499868737
+Class: feature
+
+There are two options: Either a title is customized for all graphs
+of this element or per graph the related title is used as a header.