Hello, I have a small problem and need your help.
I used several URL in my check and now need here from only the domain:
Here I found the following solution:
But this is in Jinja and I can not get it to run in sensu.
# lables
# url: https://api.server.local.cloud:8443/test/health?details=true
here i need as result only:
api.server.local.cloud:8443
i the past i use a check like this
command: check_http -H {{ .labels.url }} -C {{ .labels.cert_check_warn | default "35" }},{{ .labels.cert_check_crit | default "15" }} --ssl --sni -f follow -vvv
to this here as example
command: check_http -H {{ .labels.url.rpartition("//")[-1].partition("/")[0] }} -C {{ .labels.cert_check_warn | default "35" }},{{ .labels.cert_check_crit | default "15" }} --ssl --sni -f follow -vvv
i only find less information and examples in the sensu docs: