]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
monitoring: Add unit tests for OSD panels in ceph-cluster dashboard 44775/head
authorPatrick Seidensal <pseidensal@suse.com>
Thu, 9 Dec 2021 14:01:54 +0000 (15:01 +0100)
committerPatrick Seidensal <pseidensal@suse.com>
Tue, 25 Jan 2022 14:39:16 +0000 (15:39 +0100)
Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
(cherry picked from commit 7d7488018ea30dc61174bafcad01bb3eac8aa9bb)

monitoring/grafana/dashboards/tests/features/ceph-cluster.feature

index 0035a79595243bafba24dc7090a179ce7b6c8aa5..1a446cd2c535c9f1cb62d7ae500169fb88b343b2 100644 (file)
@@ -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      |