Werk #7761: New livestatus columns tags and labels

Component Livestatus
Title New livestatus columns tags and labels
Date Jun 4, 2019
Checkmk Edition Checkmk Raw (CRE)
Checkmk Version 1.6.0b1
Level Trivial Change
Class New Feature
Compatibility Compatible - no manual interaction needed

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

In the past one had to use the columns custom_variables 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 tags 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:

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"}]]

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

To the list of all Werks