From: Patrick Seidensal Date: Thu, 9 Dec 2021 14:01:54 +0000 (+0100) Subject: monitoring: Add unit tests for OSD panels in ceph-cluster dashboard X-Git-Tag: v16.2.8~212^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F44775%2Fhead;p=ceph.git monitoring: Add unit tests for OSD panels in ceph-cluster dashboard Signed-off-by: Patrick Seidensal (cherry picked from commit 7d7488018ea30dc61174bafcad01bb3eac8aa9bb) --- diff --git a/monitoring/grafana/dashboards/tests/features/ceph-cluster.feature b/monitoring/grafana/dashboards/tests/features/ceph-cluster.feature index 0035a79595243..1a446cd2c535c 100644 --- a/monitoring/grafana/dashboards/tests/features/ceph-cluster.feature +++ b/monitoring/grafana/dashboards/tests/features/ceph-cluster.feature @@ -19,3 +19,36 @@ Scenario: "Test OSDs in" Then Grafana panel `OSDs` with legend `In` shows: | metrics | values | | {} | 2 | + +Scenario: "Test OSDs down" + Given the following series: + | metrics | values | + | ceph_osd_up{ceph_daemon="osd.0", instance="127.0.0.1"} | 0.0 | + | ceph_osd_up{ceph_daemon="osd.1", instance="127.0.0.1"} | 0.0 | + | ceph_osd_up{ceph_daemon="osd.2", instance="127.0.0.1"} | 0.0 | + When variable `instance` is `127.0.0.1` + Then Grafana panel `OSDs` with legend `Down` shows: + | metrics | values | + | {} | 3 | + +Scenario: "Test OSDs out" + Given the following series: + | metrics | values | + | ceph_osd_in{ceph_daemon="osd.0", instance="127.0.0.1"} | 0.0 | + | ceph_osd_in{ceph_daemon="osd.1", instance="127.0.0.1"} | 1.0 | + | ceph_osd_in{ceph_daemon="osd.2", instance="127.0.0.1"} | 0.0 | + When variable `instance` is `127.0.0.1` + Then Grafana panel `OSDs` with legend `Out` shows: + | metrics | values | + | {} | 2 | + +Scenario: "Test OSDs all" + Given the following series: + | metrics | values | + | ceph_osd_metadata{ceph_daemon="osd.0", instance="127.0.0.1"} | 1.0 | + | ceph_osd_metadata{ceph_daemon="osd.1", instance="127.0.0.1"} | 1.0 | + | ceph_osd_metadata{ceph_daemon="osd.2", instance="127.0.0.1"} | 1.0 | + When variable `instance` is `127.0.0.1` + Then Grafana panel `OSDs` with legend `All` shows: + | metrics | values | + | {} | 3 |