Werk #7353: Changed format of host tags in hosts.mk configuration files

Component Core & setup
Title Changed format of host tags in hosts.mk configuration files
Date Jun 4, 2019
Checkmk Edition Checkmk Raw (CRE)
Checkmk Version 1.6.0b1
Level Prominent Change
Class Bug Fix
Compatibility Incompatible - Manual interaction might be required

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 all_hosts or clusters 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:

hosts.mk

all_hosts += [
   "my-host|cmk-agent|prod|lan|piggyback|no-snmp",
]

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:

hosts.mk:

all_hosts += [
    "my-host",
]

host_tags["heute"] = {
    "agent": "cmk-agent",
    "criticality": "prod",
    "networking": "lan",
    "piggyback": "piggyback",
    "snmp_ds": "no-snmp",
}

In the host_tags dictionary the keys are the tag groups (as defined in WATO) and the values are the tags configured for each group.

To the list of all Werks