]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
monitoring/grafana: add generated json files
authorPere Diaz Bou <pdiazbou@redhat.com>
Fri, 17 Dec 2021 07:58:58 +0000 (08:58 +0100)
committerErnesto Puerta <epuertat@redhat.com>
Fri, 28 Jan 2022 11:48:00 +0000 (12:48 +0100)
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
(cherry picked from commit 2b4f3561d2fb49c23dc489475600266f3223232e)

monitoring/grafana/dashboards/osds-overview.json
monitoring/grafana/dashboards/pool-overview.json
monitoring/grafana/dashboards/rbd-details.json
monitoring/grafana/dashboards/tests/util.py

index 141d520d6f1845c63fc1853d6bac8ecbe1ec37f8..3e88e5910b7dc6516ab04e179828de904ca2a872 100644 (file)
                "intervalFactor": 1,
                "legendFormat": "filestore",
                "refId": "B"
-            },
-            {
-               "expr": "absent(ceph_bluefs_wal_total_bytes)*count(ceph_osd_metadata)",
-               "format": "time_series",
-               "intervalFactor": 1,
-               "legendFormat": "filestore",
-               "refId": "C"
             }
          ],
          "title": "OSD Objectstore Types",
index d6c62e6e54db45912389d671d4e75d1285476da8..50145c8ab98cc8918c570f48c0dc0bd4d81daba1 100644 (file)
                "expr": "(ceph_pool_compress_under_bytes / ceph_pool_compress_bytes_used > 0) and on(pool_id) (((ceph_pool_compress_under_bytes > 0) / ceph_pool_stored_raw) * 100 > 0.5)",
                "format": "table",
                "intervalFactor": 1,
-               "legendFormat": "",
+               "legendFormat": "A",
                "refId": "A"
             },
             {
                "expr": "ceph_pool_max_avail * on(pool_id) group_left(name) ceph_pool_metadata",
                "format": "table",
                "intervalFactor": 1,
-               "legendFormat": "",
+               "legendFormat": "B",
                "refId": "B"
             },
             {
                "expr": "((ceph_pool_compress_under_bytes > 0) / ceph_pool_stored_raw) * 100",
                "format": "table",
                "intervalFactor": 1,
-               "legendFormat": "",
+               "legendFormat": "C",
                "refId": "C"
             },
             {
                "expr": "(ceph_pool_percent_used * on(pool_id) group_left(name) ceph_pool_metadata)",
                "format": "table",
                "intervalFactor": 1,
-               "legendFormat": "",
+               "legendFormat": "D",
                "refId": "D"
             },
             {
                "expr": "(ceph_pool_compress_under_bytes - ceph_pool_compress_bytes_used > 0)",
                "format": "table",
                "intervalFactor": 1,
-               "legendFormat": "",
+               "legendFormat": "E",
                "refId": "E"
             },
             {
                "expr": "delta(ceph_pool_stored[5d])",
                "format": "table",
                "intervalFactor": 1,
-               "legendFormat": "",
+               "legendFormat": "F",
                "refId": "F"
             },
             {
                "expr": "rate(ceph_pool_rd[30s]) + rate(ceph_pool_wr[30s])",
                "format": "table",
                "intervalFactor": 1,
-               "legendFormat": "",
+               "legendFormat": "G",
                "refId": "G"
             },
             {
                "expr": "rate(ceph_pool_rd_bytes[30s]) + rate(ceph_pool_wr_bytes[30s])",
                "format": "table",
                "intervalFactor": 1,
-               "legendFormat": "",
+               "legendFormat": "H",
                "refId": "H"
             },
             {
                "expr": "ceph_pool_metadata",
                "format": "table",
                "intervalFactor": 1,
-               "legendFormat": "",
+               "legendFormat": "I",
                "refId": "I"
             },
             {
                "expr": "ceph_pool_stored * on(pool_id) group_left ceph_pool_metadata",
                "format": "table",
                "intervalFactor": 1,
-               "legendFormat": "",
+               "legendFormat": "J",
                "refId": "J"
             },
             {
                "expr": "ceph_pool_metadata{compression_mode!=\"none\"}",
                "format": "table",
                "intervalFactor": 1,
-               "legendFormat": "",
+               "legendFormat": "K",
                "refId": "K"
             },
             {
                "expr": "",
                "format": "",
                "intervalFactor": "",
-               "legendFormat": "",
+               "legendFormat": "L",
                "refId": "L"
             }
          ],
index d943b16a64e0a31a659104168542722e64ef41ef..ea7f79aa27ff235db76854294fc43f56b85b0bb8 100644 (file)
                "expr": "irate(ceph_rbd_write_ops{pool=\"$Pool\", image=\"$Image\"}[30s])",
                "format": "time_series",
                "intervalFactor": 1,
-               "legendFormat": "Write",
+               "legendFormat": "{{pool}} Write",
                "refId": "A"
             },
             {
                "expr": "irate(ceph_rbd_read_ops{pool=\"$Pool\", image=\"$Image\"}[30s])",
                "format": "time_series",
                "intervalFactor": 1,
-               "legendFormat": "Read",
+               "legendFormat": "{{pool}} Read",
                "refId": "B"
             }
          ],
                "expr": "irate(ceph_rbd_write_bytes{pool=\"$Pool\", image=\"$Image\"}[30s])",
                "format": "time_series",
                "intervalFactor": 1,
-               "legendFormat": "Write",
+               "legendFormat": "{{pool}} Write",
                "refId": "A"
             },
             {
                "expr": "irate(ceph_rbd_read_bytes{pool=\"$Pool\", image=\"$Image\"}[30s])",
                "format": "time_series",
                "intervalFactor": 1,
-               "legendFormat": "Read",
+               "legendFormat": "{{pool}} Read",
                "refId": "B"
             }
          ],
                "expr": "irate(ceph_rbd_write_latency_sum{pool=\"$Pool\", image=\"$Image\"}[30s]) / irate(ceph_rbd_write_latency_count{pool=\"$Pool\", image=\"$Image\"}[30s])",
                "format": "time_series",
                "intervalFactor": 1,
-               "legendFormat": "Write",
+               "legendFormat": "{{pool}} Write",
                "refId": "A"
             },
             {
                "expr": "irate(ceph_rbd_read_latency_sum{pool=\"$Pool\", image=\"$Image\"}[30s]) / irate(ceph_rbd_read_latency_count{pool=\"$Pool\", image=\"$Image\"}[30s])",
                "format": "time_series",
                "intervalFactor": 1,
-               "legendFormat": "Read",
+               "legendFormat": "{{pool}} Read",
                "refId": "B"
             }
          ],
index 88337728e80e1ec8e8a4b325c9e6b59bdcdb3265..98b083d2345fd30a665c3fb8ab2da8c0a9355c3f 100644 (file)
@@ -41,7 +41,6 @@ def add_dashboard_queries(data: Dict[str, Any], dashboard_data: Dict[str, Any],
     if 'panels' not in dashboard_data:
         return
     error = 0
-    dashboard_title = dashboard_data['title']
     for panel in dashboard_data['panels']:
         if (
                 'title' in panel
@@ -66,7 +65,7 @@ def add_dashboard_queries(data: Dict[str, Any], dashboard_data: Dict[str, Any],
                 data['queries'][query_id] = {'query': target['expr'], 'path': path}
                 data['stats'][path]['total'] += 1
     if error:
-        raise ValueError(f'Missing legend_format in queries, please add a proper value.')
+        raise ValueError('Missing legend_format in queries, please add a proper value.')
 
 
 def add_dashboard_variables(data: Dict[str, Any], dashboard_data: Dict[str, Any]) -> None: