Module: check_mk
Branch: master
Commit: 8ed4bad9edbd583a02fbd1127c769f7830a87e19
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8ed4bad9edbd58…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Oct 24 07:51:04 2017 +0200
5405 FIX LDAP: Removed missleading and confusing "No persistent connection" option
The LDAP connector had an option to tell it that the connection to the LDAP server
should not be reused. This made the connector reconnect to the LDAP server for each
LDAP query.
Because enabling this option can result in a much longer synchronization run, the
option has now been dropped.
Change-Id: Ibf7524bc3038979cc8c67a29f468bac13eb2fafe
---
.bugs/3001 | 6 ++++--
.werks/5405 | 15 +++++++++++++++
web/htdocs/wato.py | 8 +-------
web/plugins/userdb/ldap.py | 1 -
4 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/.bugs/3001 b/.bugs/3001
index f8ee93e..fd326cf 100644
--- a/.bugs/3001
+++ b/.bugs/3001
@@ -1,7 +1,9 @@
Title: Agent encryption rule edit dosn't mark bakery dirty
Component: wato
-State: open
+Class: bug
+State: done
Date: 2017-10-20 09:37:10
Targetversion: 1.4.0
-Class: bug
+
+2017-10-24 07:45:59: changed state open -> done
diff --git a/.werks/5405 b/.werks/5405
new file mode 100644
index 0000000..3c529a6
--- /dev/null
+++ b/.werks/5405
@@ -0,0 +1,15 @@
+Title: LDAP: Removed missleading and confusing "No persistent connection" option
+Level: 1
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1508824163
+Class: fix
+
+The LDAP connector had an option to tell it that the connection to the LDAP server
+should not be reused. This made the connector reconnect to the LDAP server for each
+LDAP query.
+
+Because enabling this option can result in a much longer synchronization run, the
+option has now been dropped.
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 0ed0a55..1243d97 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6254,12 +6254,6 @@ def vs_ldap_connection(new, connection_id):
value = True,
totext = _("Encrypt the network connection using SSL."),
)),
- ("no_persistent", FixedValue(
- title = _("No persistent connection"),
- help = _("The connection to the LDAP server is not persisted."),
- value = True,
- totext = _("Don't use persistent LDAP connections."),
- )),
("connect_timeout", Float(
title = _("Connect Timeout"),
help = _("Timeout for the initial connection to the LDAP server in seconds."),
@@ -6473,7 +6467,7 @@ def vs_ldap_connection(new, connection_id):
render = "form",
form_narrow = True,
optional_keys = [
- 'no_persistent', 'port', 'use_ssl', 'bind', 'page_size', 'response_timeout', 'failover_servers',
+ 'port', 'use_ssl', 'bind', 'page_size', 'response_timeout', 'failover_servers',
'user_filter', 'user_filter_group', 'user_id', 'lower_user_ids', 'connect_timeout', 'version',
'group_filter', 'group_member', 'suffix',
],
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index ee40b24..6b24b30 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -264,7 +264,6 @@ class LDAPUserConnector(UserConnector):
connection_id = self.id()
if not enforce_new \
- and not "no_persistent" in self._config \
and self._ldap_obj \
and self._config == self._ldap_obj_config:
self._logger.debug('LDAP CONNECT - Using existing connecting')
Module: check_mk
Branch: master
Commit: c44dce43377ebca64b2fe4e0b01e7b8f240e5712
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c44dce43377ebc…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Mon Oct 23 16:33:12 2017 +0200
5408 FIX Windows perf counter base number formatting was broken
Since v1.4.0, Windows agent output has been malformatted in section(s)
winperf_*, having no space between performance counter base number and
frequency. At lest the 'Disk IO' check and any possible other checks
depending on this information have been broken since v1.4.0.
Change-Id: I7fae77e493ef9a5c2a97522b85cae01ff3dbb1fd
---
.werks/5408 | 13 +++++++++++++
agents/windows/build_version | 2 +-
agents/windows/sections/SectionWinperf.cc | 2 +-
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.werks/5408 b/.werks/5408
new file mode 100644
index 0000000..c1013d5
--- /dev/null
+++ b/.werks/5408
@@ -0,0 +1,13 @@
+Title: Windows perf counter base number formatting was broken
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1508768670
+Class: fix
+
+Since v1.4.0, Windows agent output has been malformatted in section(s)
+winperf_*, having no space between performance counter base number and
+frequency. At lest the 'Disk IO' check and any possible other checks
+depending on this information have been broken since v1.4.0.
diff --git a/agents/windows/build_version b/agents/windows/build_version
index f90da54..1648816 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-2988
+2990
diff --git a/agents/windows/sections/SectionWinperf.cc b/agents/windows/sections/SectionWinperf.cc
index ee60e0d..8c1a79f 100644
--- a/agents/windows/sections/SectionWinperf.cc
+++ b/agents/windows/sections/SectionWinperf.cc
@@ -50,7 +50,7 @@ bool SectionWinperf::produceOutputInner(std::ostream &out) {
LARGE_INTEGER Frequency;
_winapi.QueryPerformanceFrequency(&Frequency);
out << std::fixed << std::setprecision(2) << current_time() << " "
- << _base << Frequency.QuadPart << "\n";
+ << _base << " " << Frequency.QuadPart << "\n";
std::vector<PERF_INSTANCE_DEFINITION *> instances =
counterObject.instances();
Module: check_mk
Branch: master
Commit: 5bf368108c92042eb9eaadc73857e5b2f2b34094
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5bf368108c9204…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Mon Oct 23 15:50:04 2017 +0200
5306 FIX dell_compellent_folder: Fixed crash because of missing library
In the original check plugin the connection to df.include has been
missing. This is a problem only since 1.4.0, when check plugins run in their
own namespace.
Change-Id: Id61f0c660c935e51cb8ea8649a8e5d8a3f32aa18
---
.werks/5306 | 12 ++++++++++++
checks/dell_compellent_folder | 1 +
2 files changed, 13 insertions(+)
diff --git a/.werks/5306 b/.werks/5306
new file mode 100644
index 0000000..81aac6e
--- /dev/null
+++ b/.werks/5306
@@ -0,0 +1,12 @@
+Title: dell_compellent_folder: Fixed crash because of missing library
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1508766328
+Class: fix
+
+In the original check plugin the connection to df.include has been
+missing. This is a problem only since 1.4.0, when check plugins run in their
+own namespace.
diff --git a/checks/dell_compellent_folder b/checks/dell_compellent_folder
index b76d3f2..f95ca49 100644
--- a/checks/dell_compellent_folder
+++ b/checks/dell_compellent_folder
@@ -52,4 +52,5 @@ check_info['dell_compellent_folder'] = {
9, # DELL-STORAGE-SC-MIB::scDiskFolderSUSpareSpace
]),
'snmp_scan_function' : lambda oid: oid(".1.3.6.1.4.1.674.11000.2000.500.1.2.1.0"),
+ 'includes' : [ 'df.include' ],
}
Module: check_mk
Branch: master
Commit: 687b5e05efe5047b622826ae872ea4f3c2bd6371
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=687b5e05efe504…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 23 15:08:05 2017 +0200
5403 RRDCached tuning can now be configured via Global Settings
It is now possible to configure the tuning settings of the rrdcached via
WATO (Global Settings > Site Management > RRDCached tuning).
This option is often changed to tune the disk IO behavious of the RRDCached. Details
about this can be found here: http://mathias-kettner.de/cms_graphing.html
The option can be configured globally for all sites or in the site specific globals,
depending on your needs.
The default values of the options are read from the existing configuration files
(etc/rrdcached.conf and etc/rrdcached.d/*.conf).
Change-Id: I49f5626291ceaaae4ed8be32800079058a293d0f
---
.werks/5403 | 20 +++++
web/plugins/wato/omd_configuration.py | 136 ++++++++++++++++++++++++++++++++--
2 files changed, 148 insertions(+), 8 deletions(-)
diff --git a/.werks/5403 b/.werks/5403
new file mode 100644
index 0000000..4191105
--- /dev/null
+++ b/.werks/5403
@@ -0,0 +1,20 @@
+Title: RRDCached tuning can now be configured via Global Settings
+Level: 2
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1508763950
+Class: feature
+
+It is now possible to configure the tuning settings of the rrdcached via
+WATO (Global Settings > Site Management > RRDCached tuning).
+
+This option is often changed to tune the disk IO behavious of the RRDCached. Details
+about this can be found here: http://mathias-kettner.de/cms_graphing.html
+
+The option can be configured globally for all sites or in the site specific globals,
+depending on your needs.
+
+The default values of the options are read from the existing configuration files
+(etc/rrdcached.conf and etc/rrdcached.d/*.conf).
diff --git a/web/plugins/wato/omd_configuration.py b/web/plugins/wato/omd_configuration.py
index cb13103..6b65296 100644
--- a/web/plugins/wato/omd_configuration.py
+++ b/web/plugins/wato/omd_configuration.py
@@ -337,7 +337,7 @@ class ConfigDomainApache(ConfigDomain):
try:
self._write_config_file()
- p = subprocess.Popen(["omd", "restart", "apache"], shell=False, stdin=open(os.devnull),
+ p = subprocess.Popen(["omd", "reload", "apache"], shell=False, stdin=open(os.devnull),
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
stdout = p.communicate()[0]
@@ -354,8 +354,10 @@ class ConfigDomainApache(ConfigDomain):
config = self._get_effective_config()
output = wato_fileheader()
- output += "ServerLimit %d\n" % config["process_tuning"]["number_of_processes"]
- output += "MaxClients %d\n" % config["process_tuning"]["number_of_processes"]
+
+ if config:
+ output += "ServerLimit %d\n" % config["process_tuning"]["number_of_processes"]
+ output += "MaxClients %d\n" % config["process_tuning"]["number_of_processes"]
config_file_path = os.path.join(cmk.paths.omd_root, "etc/apache/conf.d", "zzz_check_mk.conf")
store.save_file(config_file_path, output)
@@ -363,8 +365,7 @@ class ConfigDomainApache(ConfigDomain):
def _get_effective_config(self):
- config = self.default_globals()
- config.update(self.load(site_specific=False))
+ config = self.load(site_specific=False)
config.update(self.load(site_specific=True))
return config
@@ -372,12 +373,12 @@ class ConfigDomainApache(ConfigDomain):
def default_globals(self):
return {
"process_tuning": {
- "number_of_processes" : self._get_value_from_apache_config("MaxClients", int, 64),
+ "number_of_processes" : self._get_value_from_config("MaxClients", int, 64),
}
}
- def _get_value_from_apache_config(self, varname, conv_func, default_value):
+ def _get_value_from_config(self, varname, conv_func, default_value):
config_files = [ os.path.join(cmk.paths.omd_root, "etc/apache/apache.conf") ]
config_files += sorted(glob.glob(os.path.join(cmk.paths.omd_root, "etc/apache/conf.d", "*.conf")))
@@ -388,7 +389,7 @@ class ConfigDomainApache(ConfigDomain):
continue # Skip the file written by this config domain
for line in open(config_file):
- if line.lstrip().startswith("MaxClients"):
+ if line.lstrip().startswith(varname):
raw_value = line.split()[1]
value = conv_func(raw_value)
@@ -413,3 +414,122 @@ register_configvar(group,
),
domain = ConfigDomainApache,
)
+
+
+#.
+# .--rrdcached-----------------------------------------------------------.
+# | _ _ _ |
+# | _ __ _ __ __| | ___ __ _ ___| |__ ___ __| | |
+# | | '__| '__/ _` |/ __/ _` |/ __| '_ \ / _ \/ _` | |
+# | | | | | | (_| | (_| (_| | (__| | | | __/ (_| | |
+# | |_| |_| \__,_|\___\__,_|\___|_| |_|\___|\__,_| |
+# | |
+# +----------------------------------------------------------------------+
+# | Use these options to tune the performance of the rrdcached |
+# '----------------------------------------------------------------------'
+
+class ConfigDomainRRDCached(ConfigDomain):
+ needs_sync = True
+ needs_activation = True
+ ident = "rrdcached"
+
+ def config_dir(self):
+ return cmk.paths.default_config_dir + "/rrdcached.d/wato/"
+
+
+ def activate(self):
+ try:
+ self._write_config_file()
+
+ p = subprocess.Popen(["omd", "restart", "rrdcached"], shell=False, stdin=open(os.devnull),
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+
+ stdout = p.communicate()[0]
+ if p.returncode != 0:
+ raise Exception(stdout)
+
+ return []
+ except Exception, e:
+ log_exception()
+ return ["Failed to activate rrdcached configuration: %s" % (traceback.format_exc())]
+
+
+ def _write_config_file(self):
+ config = self._get_effective_config()
+
+ output = wato_fileheader()
+ for key, val in sorted(config.get("tuning", {}).items()):
+ output += "%s=%d\n" % (key, val)
+
+ config_file_path = os.path.join(cmk.paths.omd_root, "etc/rrdcached.d", "zzz_check_mk.conf")
+ store.save_file(config_file_path, output)
+
+
+ def _get_effective_config(self):
+ config = self.load(site_specific=False)
+ config.update(self.load(site_specific=True))
+ return config
+
+
+ def default_globals(self):
+ return {
+ "tuning": {
+ "TIMEOUT" : self._get_value_from_config("TIMEOUT", int, 3600),
+ "RANDOM_DELAY" : self._get_value_from_config("RANDOM_DELAY", int, 1800),
+ "FLUSH_TIMEOUT" : self._get_value_from_config("FLUSH_TIMEOUT", int, 7200),
+ }
+ }
+
+
+ def _get_value_from_config(self, varname, conv_func, default_value):
+ config_files = [ os.path.join(cmk.paths.omd_root, "etc/rrdcached.conf") ]
+ config_files += sorted(glob.glob(os.path.join(cmk.paths.omd_root, "etc/rrdcached.d", "*.conf")))
+
+ value = default_value
+
+ for config_file in config_files:
+ if config_file.endswith("zzz_check_mk.conf"):
+ continue # Skip the file written by this config domain
+
+ for line in open(config_file):
+ if line.lstrip().startswith(varname):
+ raw_value = line.split("=")[1]
+ value = conv_func(raw_value)
+
+ return value
+
+
+register_configvar(group,
+ "tuning",
+ Dictionary(
+ title = _("RRDCached tuning"),
+ elements = [
+ ("TIMEOUT", Age(
+ title = _("Disk flush interval of updated metrics"),
+ help = _("Updated metrics are written to disk in the configured interval. "
+ "The write operation is only performed for metrics that are being "
+ "updated. Old metrics are not affected by this option."),
+ minvalue = 0,
+ )),
+ ("RANDOM_DELAY", Age(
+ title = _("Random delay"),
+ help = _("The rrdcached will delay writing of each metric for a random "
+ "number of seconds in the range [0..delay]. This will avoid too many "
+ "writes being queued simultaneously. This number should not be "
+ "higher than the value specified in \"Disk flush interval of "
+ "updated metrics\"."),
+ minvalue = 0,
+ )),
+ ("FLUSH_TIMEOUT", Age(
+ title = _("Disk flush interval of old data"),
+ help = _("The entire cache is searched in the interval configured here for old "
+ "values which shal be written to disk. This only concerns RRD files to "
+ "which updates have stopped, so setting this to a high value is "
+ "acceptable in most cases."),
+ minvalue = 0,
+ )),
+ ],
+ optional_keys = [],
+ ),
+ domain = ConfigDomainRRDCached,
+)
Module: check_mk
Branch: master
Commit: 4925bcf10b182e5f41c585072b3456514bcc1c4b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4925bcf10b182e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 23 14:29:15 2017 +0200
5402 Number of apache processes can now be configured via Global Settings
It is now possible to configure the apache configuration option {MaxClients} via
WATO (Global Settings > Site Management > Apache process tuning).
This option is often changed to tune the site apache to either consume less memory
(reduce the number of maximum processes) or being able to handle more users in the
GUI simultaneously.
The option can be configured globally for all sites or in the site specific globals,
depending on your needs.
The defaul value of this option is read from the existing configuration files
(etc/apache/apache.conf and etc/apache/conf.d/*.conf) and defaults to {64}.
Change-Id: I1cd97e6a3391d2cb5708a8a69fe9415e0a362cb9
---
.werks/5402 | 21 +++++++
web/plugins/wato/omd_configuration.py | 103 ++++++++++++++++++++++++++++++++++
2 files changed, 124 insertions(+)
diff --git a/.werks/5402 b/.werks/5402
new file mode 100644
index 0000000..6fe0d98
--- /dev/null
+++ b/.werks/5402
@@ -0,0 +1,21 @@
+Title: Number of apache processes can now be configured via Global Settings
+Level: 2
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1508761368
+Class: feature
+
+It is now possible to configure the apache configuration option {MaxClients} via
+WATO (Global Settings > Site Management > Apache process tuning).
+
+This option is often changed to tune the site apache to either consume less memory
+(reduce the number of maximum processes) or being able to handle more users in the
+GUI simultaneously.
+
+The option can be configured globally for all sites or in the site specific globals,
+depending on your needs.
+
+The defaul value of this option is read from the existing configuration files
+(etc/apache/apache.conf and etc/apache/conf.d/*.conf) and defaults to {64}.
diff --git a/web/plugins/wato/omd_configuration.py b/web/plugins/wato/omd_configuration.py
index 11d7734..cb13103 100644
--- a/web/plugins/wato/omd_configuration.py
+++ b/web/plugins/wato/omd_configuration.py
@@ -310,3 +310,106 @@ register_configvar(group,
replication_paths.append(("file", "diskspace", ConfigDomainDiskspace.diskspace_config))
+
+
+#.
+# .--Apache--------------------------------------------------------------.
+# | _ _ |
+# | / \ _ __ __ _ ___| |__ ___ |
+# | / _ \ | '_ \ / _` |/ __| '_ \ / _ \ |
+# | / ___ \| |_) | (_| | (__| | | | __/ |
+# | /_/ \_\ .__/ \__,_|\___|_| |_|\___| |
+# | |_| |
+# +----------------------------------------------------------------------+
+# | Manage settings of the site apache |
+# '----------------------------------------------------------------------'
+
+class ConfigDomainApache(ConfigDomain):
+ needs_sync = True
+ needs_activation = True
+ ident = "apache"
+
+ def config_dir(self):
+ return cmk.paths.default_config_dir + "/apache.d/wato/"
+
+
+ def activate(self):
+ try:
+ self._write_config_file()
+
+ p = subprocess.Popen(["omd", "restart", "apache"], shell=False, stdin=open(os.devnull),
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+
+ stdout = p.communicate()[0]
+ if p.returncode != 0:
+ raise Exception(stdout)
+
+ return []
+ except Exception, e:
+ log_exception()
+ return ["Failed to activate apache configuration: %s" % (traceback.format_exc())]
+
+
+ def _write_config_file(self):
+ config = self._get_effective_config()
+
+ output = wato_fileheader()
+ output += "ServerLimit %d\n" % config["process_tuning"]["number_of_processes"]
+ output += "MaxClients %d\n" % config["process_tuning"]["number_of_processes"]
+
+ config_file_path = os.path.join(cmk.paths.omd_root, "etc/apache/conf.d", "zzz_check_mk.conf")
+ store.save_file(config_file_path, output)
+
+
+
+ def _get_effective_config(self):
+ config = self.default_globals()
+ config.update(self.load(site_specific=False))
+ config.update(self.load(site_specific=True))
+ return config
+
+
+ def default_globals(self):
+ return {
+ "process_tuning": {
+ "number_of_processes" : self._get_value_from_apache_config("MaxClients", int, 64),
+ }
+ }
+
+
+ def _get_value_from_apache_config(self, varname, conv_func, default_value):
+ config_files = [ os.path.join(cmk.paths.omd_root, "etc/apache/apache.conf") ]
+ config_files += sorted(glob.glob(os.path.join(cmk.paths.omd_root, "etc/apache/conf.d", "*.conf")))
+
+ value = default_value
+
+ for config_file in config_files:
+ if config_file.endswith("zzz_check_mk.conf"):
+ continue # Skip the file written by this config domain
+
+ for line in open(config_file):
+ if line.lstrip().startswith("MaxClients"):
+ raw_value = line.split()[1]
+ value = conv_func(raw_value)
+
+ return value
+
+
+register_configvar(group,
+ "process_tuning",
+ Dictionary(
+ title = _("Apache process tuning"),
+ elements = [
+ ("number_of_processes", Integer(
+ title = _("Number of apache processes"),
+ help = _("Use this value to tune the maximum number of apache client requests that will be processed simultaneously "
+ "(maximum number of apache server processes allowed to start). In case you have a lot of incoming "
+ "requests in parallel it may be a good idea to increase this value. But do this carefully, more is "
+ "not always better. The apache processes normally need a decent amount of memory and you should "
+ "only configure as many apache processes as your system can handle in high load situations."),
+ minvalue = 5,
+ )),
+ ],
+ ),
+ domain = ConfigDomainApache,
+)