]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
dashboard: Resolve FQDN / hostname mismatch in hosts overview panel
authorKristoffer Grönlund <kgronlund@suse.com>
Thu, 26 Mar 2020 19:38:04 +0000 (20:38 +0100)
committerNathan Cutler <ncutler@suse.com>
Mon, 6 Apr 2020 11:53:46 +0000 (13:53 +0200)
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 <kgronlund@suse.com>
(cherry picked from commit 136d21e21dc3c05ec8c586a47eed1904ffbda578)

monitoring/grafana/dashboards/hosts-overview.json

index 0ad122f831a48dc36b49a74811d30443195f302f..7b5af33f72ef9fa3b1fdf9c19ad95d3d6a5cc6cc 100644 (file)
       "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,