aerogear / keycloak-metrics-spi

Adds a Metrics Endpoint to Keycloak
Apache License 2.0
530 stars 152 forks source link

is there away to get instance hostname in the labels for keycloak metrics #77

Closed AmjadHussainSyed closed 3 years ago

AmjadHussainSyed commented 3 years ago

Description

Add a brief and meaningful description. i'm not able to find a way to get instance hostname in labels for the keycloak metrics instead of ip address. is it supported?

Expected Behavior

Describe the expected behaviour. i need to see the hostname.

Actual Behavior

Describe the current/actual behaviour. instance=ip-address

Environment

prod

pb82 commented 3 years ago

@AmjadHussainSyed I think it would be possible by using the HOSTNAME environment variable. On Kubernetes / OpenShift this appears to be the same as the Pod name.

pb82 commented 3 years ago

But I think the proper way to do this would be to join the metric with another one in Prometheus that contains the service / host or node name. For example: https://stackoverflow.com/a/51023463