From: Kristoffer Grönlund Date: Thu, 26 Mar 2020 19:38:04 +0000 (+0100) Subject: dashboard: Resolve FQDN / hostname mismatch in hosts overview panel X-Git-Tag: v15.2.2~70^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0157200f1cc9759a1086836831229f2bbf546173;p=ceph.git dashboard: Resolve FQDN / hostname mismatch in hosts overview panel In the AVG Disk Utilization panel, the result is calculated by combining the output of node_disk_io_time_seconds_total with the output of ceph_disk_occupation. However, the first vector encodes the instance label with the full FQDN while the ceph label only contains the hostname:port. In order for these to match correctly, the domain name and port has to be stripped from the labels. Fixes: https://tracker.ceph.com/issues/44784 Signed-off-by: Kristoffer Grönlund (cherry picked from commit 136d21e21dc3c05ec8c586a47eed1904ffbda578) --- diff --git a/monitoring/grafana/dashboards/hosts-overview.json b/monitoring/grafana/dashboards/hosts-overview.json index 0ad122f831a..7b5af33f72e 100644 --- a/monitoring/grafana/dashboards/hosts-overview.json +++ b/monitoring/grafana/dashboards/hosts-overview.json @@ -431,7 +431,7 @@ "tableColumn": "", "targets": [ { - "expr" : "avg (\n ((irate(node_disk_io_time_ms[5m]) / 10 ) or\n (irate(node_disk_io_time_seconds_total[5m]) * 100)\n ) *\n on(instance, device) label_replace(label_replace(ceph_disk_occupation{instance=~\"($osd_hosts).*\"}, \"device\", \"$1\", \"device\", \"/dev/(.*)\"), \"instance\", \"$1\", \"instance\", \"(.*)\")\n)", + "expr" : "avg (\n label_replace((irate(node_disk_io_time_ms[5m]) / 10 ) or\n (irate(node_disk_io_time_seconds_total[5m]) * 100), \"instance\", \"$1\", \"instance\", \"([^.:]*).*\"\n ) *\n on(instance, device) label_replace(label_replace(ceph_disk_occupation{instance=~\"($osd_hosts).*\"}, \"device\", \"$1\", \"device\", \"/dev/(.*)\"), \"instance\", \"$1\", \"instance\", \"([^.:]*).*\")\n)", "format": "time_series", "instant": true, "intervalFactor": 1,