ID: 7770
Title: Fix "Periodic service discovery" disabling rules breaking config
Component: Core & setup
Level: 2
Class: Bug fix
Version: 1.7.0i1
In 1.6.0b1 a rule in the ruleset "Periodic service discovery" that is
configured with the option "Do not perform service discovery check" resulted
in the following exception when updating the core config (e.g. with cmk -U):
C+:
OMD[testsite]:~$ cmk --debug -Uv
Generating configuration for core (type cmc)...
time period '24X7': 2 time points
Configuration Error: 'NoneType' object has no attribute '__getitem__'
Traceback (most recent call last):
File "/omd/sites/testsite/bin/cmk", line 94, in
exit_status = modes.call(mode_name, mode_args, opts, args)
File "/omd/sites/testsite/lib/python/cmk_base/modes/__init__.py", line 72, in call
return mode.handler_function(*handler_args)
File "/omd/sites/testsite/lib/python/cmk_base/modes/check_mk.py", line 1106, in mode_update
do_update(create_core(options), with_precompile=True)
File "/omd/sites/testsite/lib/python/cmk_base/core_config.py", line 266, in do_update
do_create_config(core, with_agents=with_precompile)
File "/omd/sites/testsite/lib/python/cmk_base/core_config.py", line 219, in do_create_config
create_core_config(core)
File "/omd/sites/testsite/lib/python/cmk_base/core_config.py", line 235, in create_core_config
core.create_config()
File "/omd/sites/testsite/lib/python/cmk_base/cee/core_cmc.py", line 63, in create_config
_create_config_hook(self._cmc_file)
File "/omd/sites/testsite/lib/python/cmk_base/cee/core_cmc.py", line 123, in _create_config_hook
hosts_config = _measure_time(cmc_all_hosts)
File "/omd/sites/testsite/lib/python/cmk_base/cee/core_cmc.py", line 156, in _measure_time
result = func(*args, **kwargs)
File "/omd/sites/testsite/lib/python/cmk_base/cee/core_cmc.py", line 457, in cmc_all_hosts
cmc_hosts = CMCHosts(config_cache.all_active_hosts(), CMCHostConfig)
File "/omd/sites/testsite/lib/python/cmk_base/cee/core_cmc.py", line 501, in __init__
self._compute(hostnames, host_class)
File "/omd/sites/testsite/lib/python/cmk_base/cee/core_cmc.py", line 513, in _compute
host_config = host_class(hostname)
File "/omd/sites/testsite/lib/python/cmk_base/cee/core_cmc.py", line 966, in __init__
self._compute()
File "/omd/sites/testsite/lib/python/cmk_base/cee/core_cmc.py", line 984, in _compute
self._cmc_services()
File "/omd/sites/testsite/lib/python/cmk_base/cee/core_cmc.py", line 1259, in _cmc_services
if disc_check_params["check_interval"] \
TypeError: 'NoneType' object has no attribute '__getitem__'
C-:
ID: 7767
Title: Prevent "read only" host attributes from being cleaned up
Component: WATO
Level: 1
Class: Bug fix
Version: 1.7.0i1
The different "read only" host attributes in WATO (e.g. Network scan result,
created time, locked by, ...) could be reset to the default value using the
host attribute cleanup dialog. These options will now be hidden from that
dialog.
ID: 6972
Title: Support SQL-style quoting for filtering dict-valued columns
Component: Livestatus
Level: 1
Class: New feature
Version: 1.7.0i1
Some Livestatus columns do not contain a simple value or a list of such values,
they contain a dictionary of key/value pairs. More concretely, the
<ul>
<li><tt>custom_variables</tt></li>
<li><tt>label_sources</tt></li>
<li><tt>labels</tt></li>
<li><tt>tags</tt></li>
</ul>
columns in the
<ul>
<li><tt>contacts</tt></li>
<li><tt>hosts</tt></li>
<li><tt>hostsbygroup</tt></li>
<li><tt>services</tt></li>
<li><tt>servicesbygroup</tt></li>
<li><tt>servicesbyhostgroup</tt></li>
</ul>
tables contain dictionary values. Livestatus filter for such columns have a
special syntax:
C+:
Filter: COLUMN OPERATOR KEY VALUE
C-:
As an example, the query:
C+:
GET hosts
Filter: tag = agent cmk-agent
C-:
returns all hosts where the tag "agent" has the value "cmk-agent". Note that the
key and the value are separated by whitespace. But this makes it impossible to
query for a tag name with spaces. To support more general keys and values in
such filters, Livestatus now additionally supports SQL-style quoting for such
column filters:
C+:
Filter: labels = 'It''s so' 'cool, man!'
C-:
This filter matches a label with key "It's so" and value "cool, man!". Note the
use of 2 consecutive single quotes to represent 1 single quote. The previous
syntax still works, the new syntax is triggered by a leading single quote in the
key and/or value.
ID: 7482
Title: mk_mysql: More consistent naming of instances
Component: Checks & agents
Level: 1
Class: Bug fix
Version: 1.6.0i1
The naming of different mysql instances has been simplified.
The item names of the monitored instances are now given by the corresponding sockets
(e.g. an instance using the socket "/var/run/mysql.sock" will be called "/var/run/mysql.sock").
If no socket can be determined, only one instance will be monitored, using the default name "mysql".
Previously as a third attempt the <tt>--user=</tt> option found in the output of <tt>ps -fww -C mysqld</tt>
has been used as instance name. This is not longer considered.
The determination of the sockets themselves is unchanged:
If no sockets are listed in the config file, the socket is determined by the <tt>--socket=</tt>
option found in <tt>ps -fww -C mysqld</tt>.
If you are monitoring mysql instances that do not use the default item name "mysql",
a rediscovery is required.
ID: 7351
Title: Removed "checks" configuration variable
Component: Core & setup
Level: 2
Class: Bug fix
Version: 1.6.0b1
The Checkmk configuration variable <tt>checks</tt> was removed
It was used in hand configured Checkmk configurations in the early days. This
variable was never configurable by WATO. In case you configured Check_MK only
via WATO you will not be affected by this issue.
In case you need to migrate your configuration, you could move the
configuration to the WATO ruleset "Classical Active and Passive Monitoring
Checks".
ID: 7760
Title: Web API: Changed format of rules in get_ruleset/set_ruleset
Component: WATO
Level: 2
Class: Bug fix
Version: 1.6.0b1
The Web API calls <tt>get_ruleset</tt> and <tt>set_ruleset</tt>, that were
added with #4699 in Checkmk 1.5 have been changed in an incompatible way.
If you use these API calls in your scripts, you will have to change these
script to be compatible with Checkmk 1.6 and newer.
The change was caused by the change of the internal rule data structure, which
is described in detail in #7352.
The API calls now work with the internal rule format with the difference that
the <tt>host_folder</tt> condition is removed from the rules returned by
<tt>get_ruleset</tt> and automatically added to the rules that are written with
<tt>set_ruleset</tt>.
ID: 7353
Title: Changed format of host tags in hosts.mk configuration files
Component: Core & setup
Level: 2
Class: Bug fix
Version: 1.6.0b1
The internal data format of the Checkmk host and cluster definitions,
normally configured via WATO "Hosts" pages has been changed.
If you only use WATO for configuring Checkmk this change will not be relevant
for you, since the data format will be changed automatically during update to
1.6x. Have a look at #7352 for further information on the update mechanism.
In case you edit hosts.mk (or other .mk) files manually or via script to define
the <tt>all_hosts</tt> or <tt>clusters</tt> configuration options, you will
likely have to change your scripts or at least the configuration files.
A host definition with it's tags in the old format looks like this:
F+:hosts.mk
all_hosts += [
"my-host|cmk-agent|prod|lan|piggyback|no-snmp",
]
F-:
The first element is the host name and the tags of the host are listed in the
same string, separated via pipe characters. There is no information about the
tag group the configured tag is related with.
The new structure looks like this:
F+:hosts.mk:
all_hosts += [
"my-host",
]
host_tags["heute"] = {
"agent": "cmk-agent",
"criticality": "prod",
"networking": "lan",
"piggyback": "piggyback",
"snmp_ds": "no-snmp",
}
F-:
In the <tt>host_tags</tt> dictionary the keys are the tag groups (as defined in WATO)
and the values are the tags configured for each group.