sipcapture / homer7-docker

HOMER 7 Docker Images
92 stars 86 forks source link

Panel target name must be updated to instance #77

Closed systemcrash closed 4 years ago

systemcrash commented 4 years ago

https://github.com/sipcapture/homer7-docker/blob/4bdd185fcf98090c749461d8cb693aa22a357679/heplify-server/hom7-prom-all/grafana/provisioning/dashboards/SIP_Methods%26Responses.json#L97

Every single JSON file contains this expression:

target_name=~

For the dashboard variable, tn. This interface_name never fills. Probably because what Prometheus provides is:

instance and job. instance for me contains heplify-server:9096

e.g.

heplify_method_response{instance="heplify-server:9096", job="heplify-server", method="ACK", node_id="1", response="ACK"}
heplify_method_response{instance="heplify-server:9096", job="heplify-server", method="BYE", node_id="1", response="200"}
heplify_method_response{instance="heplify-server:9096", job="heplify-server", method="BYE", node_id="1", response="404"}

So I think all JSON shold be updated to use this expression so panels start to work (properly).

i.e. from the broken label_values(heplify_method_response, target_name) to the working label_values(heplify_method_response, instance)

And all expressions in the panels updated from the broken target_name=~"$tn", to the working instance="$tn", or instance=~"$tn",

I did this and my drop-down fills and panels display. This applies to all homer*-docker, I think. Are there any older Prometheus instances you want to retain support for?

systemcrash commented 4 years ago

Suggested fix in #78