[checkmk-commits] [tribe29/checkmk] 931774: 7351 FIX Removed "checks" configuration variable

Lars noreply at github.com
Tue Jun 4 21:21:07 CEST 2019


  Branch: refs/heads/master
  Home:   https://github.com/tribe29/checkmk
  Commit: 931774901acb4917ec350ecdfd00f7cae0ed3b38
      https://github.com/tribe29/checkmk/commit/931774901acb4917ec350ecdfd00f7cae0ed3b38
  Author: Lars Michelsen <lm at mathias-kettner.de>
  Date:   2019-06-04 (Tue, 04 Jun 2019)

  Changed paths:
    A .werks/7351

  Log Message:
  -----------
  7351 FIX Removed "checks" configuration variable

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".

Change-Id: I6b2894ea010838cbafee98cb0f250c3b474b1be8


  Commit: 87fdcde9055f33b2fc548ba08c8304bc269e80a2
      https://github.com/tribe29/checkmk/commit/87fdcde9055f33b2fc548ba08c8304bc269e80a2
  Author: Lars Michelsen <lm at mathias-kettner.de>
  Date:   2019-06-04 (Tue, 04 Jun 2019)

  Changed paths:
    M .werks/first_free

  Log Message:
  -----------
  Reserved 20 Werk IDS

Change-Id: I18519aef4a3bb519e1673035d2ec28984bce737f


  Commit: fe6a534dc8396dee145b813541219d1b007be1e9
      https://github.com/tribe29/checkmk/commit/fe6a534dc8396dee145b813541219d1b007be1e9
  Author: Lars Michelsen <lm at mathias-kettner.de>
  Date:   2019-06-04 (Tue, 04 Jun 2019)

  Changed paths:
    A .werks/7352

  Log Message:
  -----------
  7352 FIX Changed format of rules in rules.mk configuration files

The internal data format of the Checkmk rules configured via WATO on the "Host-
& Service parameters" 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.

In case you edit rules.mk (or other .mk) files manually or via script, you will
likely have to change your scripts.

The format changes was needed to make more flexible rule conditions possible.
The new conditions for 1.6 (select multiple choices of a tag group and labels)
have not been added yet. They are nearly ready and will be added in one of the
next beta releases.

In Checkmk a ruleset is represented by a list of rules. In the past these rules
were represented by tuples with different elements (depending on the ruleset type).
The structure of a rule has now been changed to a dictionary.

An example from the sample configuration:

Old ruleset:

F+:rules.mk
host_contactgroups = [
  ('all',
   [],
   ALL_HOSTS,
   {
       'description': u'Put all hosts into the contact group "all"'
   }
  ),
] + host_contactgroups
F-:rules.mk

New ruleset:

F+:rules.mk
host_contactgroups = [
    {
        'condition': {
            'host_folder': '/' + FOLDER_PATH
        },
        'value': 'all',
        'options': {
            'description': u'Put all hosts into the contact group "all"'
        }
    },
] + host_contactgroups
F-:rules.mk

This shows the rough structure of the new format. Inside the condition dictionary
you can have multiple optional keys which trigger different host / service filters
in Checkmk.

Change-Id: I8a464dea3284160abed364cca018376a712b1c3f
TODO: Felder
TODO: Updated mechanism


  Commit: b6ba67d41fadab92435c7f1c774680303e9711f0
      https://github.com/tribe29/checkmk/commit/b6ba67d41fadab92435c7f1c774680303e9711f0
  Author: Lars Michelsen <lm at mathias-kettner.de>
  Date:   2019-06-04 (Tue, 04 Jun 2019)

  Changed paths:
    A .werks/7353

  Log Message:
  -----------
  7353 FIX Changed format of host tags in hosts.mk configuration files

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.

Change-Id: Ie8e759553f11f35d2bdf54e0e9ec7e486c13e00f


  Commit: d4ba6f1a4addb43b597480934de508d07326719e
      https://github.com/tribe29/checkmk/commit/d4ba6f1a4addb43b597480934de508d07326719e
  Author: Lars Michelsen <lm at mathias-kettner.de>
  Date:   2019-06-04 (Tue, 04 Jun 2019)

  Changed paths:
    A .werks/7760

  Log Message:
  -----------
  7760 FIX Web API: Changed format of rules in get_ruleset/set_ruleset

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>.

Change-Id: I2f1d9a6af2ed91c812b4287d4bd9dfd51fa69ee7


  Commit: 11c3e25b57f6042dc5b4ca19a8c786a5d46e5487
      https://github.com/tribe29/checkmk/commit/11c3e25b57f6042dc5b4ca19a8c786a5d46e5487
  Author: Lars Michelsen <lm at mathias-kettner.de>
  Date:   2019-06-04 (Tue, 04 Jun 2019)

  Changed paths:
    A .werks/7761

  Log Message:
  -----------
  7761 New livestatus columns tags and labels

The hosts and services tables now have two new columns named
<tt>tags</tt> for fetching the configured tags and <tt>labels</tt>
for fetching the configured labels.

In the past one had to use the columns <tt>custom_variables</tt>
to get the TAGS custom variable of a host and parse the value of
this variable to get the configured host tags. This approach also
had some limitations in terms of filtering by tags. The tag group
information was totally missing here.

The new <tt>tags</tt> column can be parsed and filtered with less
trouble. If you do livestatus queries on the tags we recommend to
use these fields.

One example for a livestatus query and the resulting data:

C+:
OMD[heute]:~$ lq "GET hosts\nColumns: tags\nOutputFormat: json"
[[{"snmp_ds":"no-snmp","address_family":"no-ip","networking":"lan","tcp":"tcp","site":"heute","piggyback":"piggyback","criticality":"prod","agent":"cmk-agent"}]]
C-:

The filtering can be done just like for other dictionary style
columns.

Change-Id: If40729146b1105ef1fcd0e4b4d3488d19ae8f213


  Commit: 1579783989792a66432de0b8b0f37cf6bf89d7e6
      https://github.com/tribe29/checkmk/commit/1579783989792a66432de0b8b0f37cf6bf89d7e6
  Author: Lars Michelsen <lm at mathias-kettner.de>
  Date:   2019-06-04 (Tue, 04 Jun 2019)

  Changed paths:
    A .werks/7762

  Log Message:
  -----------
  7762 FIX Aux tag IDs and tag group IDs need to be unique now

In previous versions it was possible to configure auxiliary tags with
an ID that was also used as tag group ID. This resulted in name conflicts
and subtile inconsistencies in different situations.

To prevent these problems Checkmk now enforces these IDs to be unique.

Change-Id: I2127f5c71358ac1ec27c8a8bc25e9cfa160a76f3


  Commit: 2a7a34d4fec632d3ce657b2c5d1cb63258496fc4
      https://github.com/tribe29/checkmk/commit/2a7a34d4fec632d3ce657b2c5d1cb63258496fc4
  Author: Lars Michelsen <lm at mathias-kettner.de>
  Date:   2019-06-04 (Tue, 04 Jun 2019)

  Changed paths:
    A .werks/7763

  Log Message:
  -----------
  7763 Introduce labels as host and service properties

In addition to existing mechanisms like host tags and host custom attributes
that can be used to define custom host properties we have now added the labels.

The labels are similar to the host tags, but not work exactly in the same way.
A major difference is, that tags are based on a predefined collection of
tags (tag groups, tag ids) in Check_MK.  Labels are more flexible and can
be created ad-hoc.

The explicit labels attribute is inherited from folders to hosts. Each
object may add a set of labels on it's own to the effective labels.

A label has the format <tt>key:value</tt>. For example <tt>os:windows</tt>.

Each host can have only one value per key. In case folders and hosts
define a value for the same key, the value next to the host will win.

The rulesets "Host labels" and "Service labels" can be used to assign labels to
hosts and services in addition to the labels configured using the host
attribute. Thes ruleset make it possible to assign lables to hosts and services
based on tags and other host / service conditions.

Labels can be created dynamically during runtime. Host labels can be discovered
using the HW/SW inventory. To realize this a new HW/SW inventory plugin has been
added that works on a generic "<<<labels>>>" section (see #7336).

The first agents that produce this section are the Kubernetes, AWS and Azure
special agents. They creates the label sections for all kind of objects that
are monitored by Checkmk. This makes Checkmk automatically import the labels
configured in the target systems.

Depending on the source of a label it is now colorized in different ways to
make the origin of the label transparent to the user.

The effective labels of hosts and service sare currently visible on WATO
"Parameters of X" page, mainly for diagnose.

The labels are available on the HW/SW inventory page and can be used as painter,
sorter and filter in the status views and reports. The painters have been added
to the host and service detail views.

The labels can currently not be used in rule conditions. This will be added in
one of the next beta releases.

Change-Id: I8488dc43578cf7be22bed9ac7f3715cee5cfdaad


Compare: https://github.com/tribe29/checkmk/compare/bc80807265ec...2a7a34d4fec6


More information about the checkmk-commits mailing list