Skip to content

Commit

Permalink
Add an informative message on why graphs are empty
Browse files Browse the repository at this point in the history
  • Loading branch information
nobuto-m committed Nov 2, 2023
1 parent 0e80716 commit 8a6974e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 15 deletions.
29 changes: 23 additions & 6 deletions monitoring/ceph-mixin/dashboards/rbd.libsonnet
@@ -1,12 +1,22 @@
local g = import 'grafonnet/grafana.libsonnet';
local u = import 'utils.libsonnet';

local info_rbd_stats = std.join(
' ',
[
'RBD per-image IO statistics are disabled by default.\n\n',
'Please refer to',
'https://charmhub.io/ceph-mon/configure#rbd-stats-pools',
'for information about how to enable those optionally.',
]
);

(import 'utils.libsonnet') {
'rbd-details.json':
local RbdDetailsPanel(title, formatY1, expr1, expr2, x, y, w, h) =
local RbdDetailsPanel(title, description, formatY1, expr1, expr2, x, y, w, h) =
$.graphPanelSchema({},
title,
'',
description,
'null as zero',
false,
formatY1,
Expand Down Expand Up @@ -83,6 +93,7 @@ local u = import 'utils.libsonnet';
.addPanels([
RbdDetailsPanel(
'IOPS',
info_rbd_stats,
'iops',
'rate(ceph_rbd_write_ops{%(matchers)s, pool="$pool", image="$image"}[$__rate_interval])' % $.matchers()
,
Expand All @@ -94,6 +105,7 @@ local u = import 'utils.libsonnet';
),
RbdDetailsPanel(
'Throughput',
info_rbd_stats,
'Bps',
'rate(ceph_rbd_write_bytes{%(matchers)s, pool="$pool", image="$image"}[$__rate_interval])' % $.matchers(),
'rate(ceph_rbd_read_bytes{%(matchers)s, pool="$pool", image="$image"}[$__rate_interval])' % $.matchers(),
Expand All @@ -104,6 +116,7 @@ local u = import 'utils.libsonnet';
),
RbdDetailsPanel(
'Average Latency',
info_rbd_stats,
'ns',
|||
rate(ceph_rbd_write_latency_sum{%(matchers)s, pool="$pool", image="$image"}[$__rate_interval]) /
Expand All @@ -121,6 +134,7 @@ local u = import 'utils.libsonnet';
]),
'rbd-overview.json':
local RbdOverviewPanel(title,
description,
formatY1,
expr1,
expr2,
Expand All @@ -132,7 +146,7 @@ local u = import 'utils.libsonnet';
h) =
$.graphPanelSchema({},
title,
'',
description,
'null as zero',
false,
formatY1,
Expand Down Expand Up @@ -196,6 +210,7 @@ local u = import 'utils.libsonnet';
.addPanels([
RbdOverviewPanel(
'IOPS',
info_rbd_stats,
'short',
'round(sum(rate(ceph_rbd_write_ops{%(matchers)s}[$__rate_interval])))' % $.matchers(),
'round(sum(rate(ceph_rbd_read_ops{%(matchers)s}[$__rate_interval])))' % $.matchers(),
Expand All @@ -208,6 +223,7 @@ local u = import 'utils.libsonnet';
),
RbdOverviewPanel(
'Throughput',
info_rbd_stats,
'Bps',
'round(sum(rate(ceph_rbd_write_bytes{%(matchers)s}[$__rate_interval])))' % $.matchers(),
'round(sum(rate(ceph_rbd_read_bytes{%(matchers)s}[$__rate_interval])))' % $.matchers(),
Expand All @@ -220,6 +236,7 @@ local u = import 'utils.libsonnet';
),
RbdOverviewPanel(
'Average Latency',
info_rbd_stats,
'ns',
|||
round(
Expand All @@ -242,7 +259,7 @@ local u = import 'utils.libsonnet';
),
$.addTableSchema(
'${prometheusds}',
'',
info_rbd_stats,
{ col: 3, desc: true },
[
$.overviewStyle('Pool', 'pool', 'string', 'short'),
Expand Down Expand Up @@ -273,7 +290,7 @@ local u = import 'utils.libsonnet';
) + { gridPos: { x: 0, y: 7, w: 8, h: 7 } },
$.addTableSchema(
'${prometheusds}',
'',
info_rbd_stats,
{ col: 3, desc: true },
[
$.overviewStyle('Pool', 'pool', 'string', 'short'),
Expand Down Expand Up @@ -304,7 +321,7 @@ local u = import 'utils.libsonnet';
) + { gridPos: { x: 8, y: 7, w: 8, h: 7 } },
$.addTableSchema(
'${prometheusds}',
'',
info_rbd_stats,
{ col: 3, desc: true },
[
$.overviewStyle('Pool', 'pool', 'string', 'short'),
Expand Down
6 changes: 3 additions & 3 deletions monitoring/ceph-mixin/dashboards_out/rbd-details.json
Expand Up @@ -43,7 +43,7 @@
"dashLength": 10,
"dashes": false,
"datasource": "${prometheusds}",
"description": "",
"description": "RBD per-image IO statistics are disabled by default.\n\n Please refer to https://charmhub.io/ceph-mon/configure#rbd-stats-pools for information about how to enable those optionally.",
"fill": 1,
"fillGradient": 0,
"gridPos": {
Expand Down Expand Up @@ -136,7 +136,7 @@
"dashLength": 10,
"dashes": false,
"datasource": "${prometheusds}",
"description": "",
"description": "RBD per-image IO statistics are disabled by default.\n\n Please refer to https://charmhub.io/ceph-mon/configure#rbd-stats-pools for information about how to enable those optionally.",
"fill": 1,
"fillGradient": 0,
"gridPos": {
Expand Down Expand Up @@ -229,7 +229,7 @@
"dashLength": 10,
"dashes": false,
"datasource": "${prometheusds}",
"description": "",
"description": "RBD per-image IO statistics are disabled by default.\n\n Please refer to https://charmhub.io/ceph-mon/configure#rbd-stats-pools for information about how to enable those optionally.",
"fill": 1,
"fillGradient": 0,
"gridPos": {
Expand Down
12 changes: 6 additions & 6 deletions monitoring/ceph-mixin/dashboards_out/rbd-overview.json
Expand Up @@ -55,7 +55,7 @@
"dashLength": 10,
"dashes": false,
"datasource": "${prometheusds}",
"description": "",
"description": "RBD per-image IO statistics are disabled by default.\n\n Please refer to https://charmhub.io/ceph-mon/configure#rbd-stats-pools for information about how to enable those optionally.",
"fill": 1,
"fillGradient": 0,
"gridPos": {
Expand Down Expand Up @@ -148,7 +148,7 @@
"dashLength": 10,
"dashes": false,
"datasource": "${prometheusds}",
"description": "",
"description": "RBD per-image IO statistics are disabled by default.\n\n Please refer to https://charmhub.io/ceph-mon/configure#rbd-stats-pools for information about how to enable those optionally.",
"fill": 1,
"fillGradient": 0,
"gridPos": {
Expand Down Expand Up @@ -241,7 +241,7 @@
"dashLength": 10,
"dashes": false,
"datasource": "${prometheusds}",
"description": "",
"description": "RBD per-image IO statistics are disabled by default.\n\n Please refer to https://charmhub.io/ceph-mon/configure#rbd-stats-pools for information about how to enable those optionally.",
"fill": 1,
"fillGradient": 0,
"gridPos": {
Expand Down Expand Up @@ -331,7 +331,7 @@
{
"columns": [ ],
"datasource": "${prometheusds}",
"description": "",
"description": "RBD per-image IO statistics are disabled by default.\n\n Please refer to https://charmhub.io/ceph-mon/configure#rbd-stats-pools for information about how to enable those optionally.",
"gridPos": {
"h": 7,
"w": 8,
Expand Down Expand Up @@ -433,7 +433,7 @@
{
"columns": [ ],
"datasource": "${prometheusds}",
"description": "",
"description": "RBD per-image IO statistics are disabled by default.\n\n Please refer to https://charmhub.io/ceph-mon/configure#rbd-stats-pools for information about how to enable those optionally.",
"gridPos": {
"h": 7,
"w": 8,
Expand Down Expand Up @@ -535,7 +535,7 @@
{
"columns": [ ],
"datasource": "${prometheusds}",
"description": "",
"description": "RBD per-image IO statistics are disabled by default.\n\n Please refer to https://charmhub.io/ceph-mon/configure#rbd-stats-pools for information about how to enable those optionally.",
"gridPos": {
"h": 7,
"w": 8,
Expand Down

0 comments on commit 8a6974e

Please sign in to comment.