I have made it to set a service label while discovery like described here: Service labels can now be discovered.
But does someone know how to update them? Because if the value changes or if I want to add another label it will only work for the very first time of discovery when the service will be added. If the service is already there and I do a reschedule of discovery then nothing changes.
Service labels are only discovered on first discovery, but not updated if they chang later on. Observed on 2.1.0p23
The service labels are persited/stored in ~/var/check_mk/autochecks/<host>.mk
My workaround:
I use service labels like sla:9-17 or sla:8-16
I also put this in the service name so my service name is e.g. “VPN Madrid sla:9-17”
If now the service changes it’s sla service label from sla:9-17 to sla:8-16 also the service name will change. The service “VPN Madrid sla:9-17” will vanish and a new service “VPN Madrid sla:8-16” will appear.
In this case the service label is set correctly because it works for the very first time something is discovered.
For me thats okay since I only interested in the status, but if you also have metric with this approach you will loose the rrd metrics
But we want the service labels to be updated or verified on each discovery.
The question would be: is the behaviour of “service labels aren’t updated” a case of: works as designed? Otherwise, is there already an open bug at tribe29 that you are aware of?