Werk #7761: New livestatus columns tags and labels
Komponente | Livestatus | ||
Titel | New livestatus columns tags and labels | ||
Datum | 04.06.2019 | ||
Level | Kleine Änderung | ||
Klasse | Neues Feature | ||
Kompatibilität | Kompatibel - benötigt kein manuelles Eingreifen | ||
Checkmk versions & editions |
|
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.