canonical / openstack-exporter-operator

The openstack-exporter-operator is a machine charm for openstack-exporter.
https://charmhub.io/openstack-exporter
Apache License 2.0
1 stars 6 forks source link

hardcoded range value as 2m instead of $__rate_interval #46

Closed nobuto-m closed 3 months ago

nobuto-m commented 3 months ago

Now we are getting updated dashboard definitions, which is good. However, I still see some hardcoded range values in those dashboard definitions. For example, this panel says rate over 1min: https://github.com/canonical/openstack-exporter-operator/blob/882043f084a4b9164e944a964e366e12cd551e22/src/grafana_dashboards/hypervisor-openstack-exporter-dashboard.json#L968

However, the actual query is over 2m. https://github.com/canonical/openstack-exporter-operator/blob/882043f084a4b9164e944a964e366e12cd551e22/src/grafana_dashboards/hypervisor-openstack-exporter-dashboard.json#L1046

Grafana recommends $__rate_interval variable for a range: https://grafana.com/blog/2020/09/28/new-in-grafana-7.2-__rate_interval-for-prometheus-rate-queries-that-just-work/ So we might be able to eliminate those hardcoded ranges.

samuelallan72 commented 3 months ago

Opened a patch over at openstack/sunbeam-charms/+/916851 (the source of truth for the dashboards).

Pjack commented 3 months ago

It is merged from upstream https://github.com/canonical/openstack-exporter-operator/pull/53