monitoring/grafana: add generated json files

Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
This commit is contained in:
Pere Diaz Bou 2021-12-17 08:58:58 +01:00
parent b381a83e9b
commit 2b4f3561d2
4 changed files with 19 additions and 27 deletions

View File

@ -482,13 +482,6 @@
"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",

View File

@ -1052,84 +1052,84 @@
"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"
}
],

View File

@ -82,14 +82,14 @@
"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"
}
],
@ -174,14 +174,14 @@
"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"
}
],
@ -266,14 +266,14 @@
"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"
}
],

View 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: