One of our services also outputs an URL:
OMD[cmk]:~$ cmk -vp testhos
Health Flux Capacitor https://myservice.company.tld:8080/tld.company.foo.bar.baz/actuator/health ()
This is converted into an globe icon which is clickable
which is very nice.
But I also want the URL to be visible in the GUI like this (faked image with gimp):
Is there a way to escape the URL in the summary, details so that it is visable in the GUI ?
Even pointer to the code that does the link to icon href magic is welcome.
PS: some related werks
you can try the “Escape HTML in service output” rule or the same setting in “Global settings”.
Thanks for the hint. I know that setting but I do not want to use it
because it is a security risk.
I forward problems to notification systems like slack, ms teams, sms and I do not want to have html code in the service details. we just need plain text there.
By default, for security reasons, the GUI does not interpret any HTML code received from external sources, like service output or log messages. If you are really sure what you are doing and need to have HTML code, like links rendered, disable this option. Be aware, you might open the way for several injection attacks. The configured value for a service is accessible in notifications as well via the variable SERVICE_ESCAPE_PLUGIN_OUTPUT of the notification context.