Libvirt Metrics: $host is None in Grafana dashboard if exported values lack dns_name

Bug #1893998 reported by Paul Goins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Prometheus libvirt exporter charm
Triaged
Medium
Unassigned

Bug Description

On one cloud where prometheus-libvirt-exporter has been deployed, records from the exporter look like this in prometheus:

libvirt_up{group="promoagents-juju",instance="[IP REDACTED]:9177",job="prometheus-libvirt-exporter"}

There is no dns_name field.

As the host variable on this dashboard is defined as "label_values(libvirt_up, dns_name)", this results in $host being empty and not being able to use host-based filtering.

Revision history for this message
Paul Goins (vultaire) wrote :

This bug extends in impact into the overall dashboard, as a number of fields use expressions such as {dns_name=~"$host"}. Especially when dns_name isn't available on these fields (and thus $host becomes ""), this generates data of limited use - basically everything gets lumped together.

Either we need to always ensure dns_name is present (e.g. stuffing an IP in if DNS names aren't available), or perhaps we need to split on some other identifier?

Jose Guedez (jfguedez)
Changed in charm-prometheus-libvirt-exporter:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Giuseppe Petralia (peppepetra) wrote :

I hit the same today. I upgraded prometheus charm to latest (rev. 24) and scrape jobs had dns_name configured and libvirt dashboard was loading correctly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.