I expect it's for a drop-down menu in the dashboard.
If your pg_exporter_last_scrape_duration_seconds metric doesn't have any
label "kubernetes_namespace", then that Grafana query isn't going to find
any values for that dropdown.
But if the variable has an empty value, then any dashboard query of the form
pg_whatever{kubernetes_namespace="$namespace"}
will match all metrics with {kubernetes_namespace=""}, which is the same as
metrics without a "kubernetes_namespace" label.
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/3a314228-faea-47fd-b8a5-90ff487c6d97o%40googlegroups.com.