Skip to content

Commit 1772dc1

Browse files
mgr/dashboard: Changing SimpleGraphPanel to TimeSeries Panel in cephfs.libsonnet
Tracker:- https://tracker.ceph.com/issues/69404 Signed-off-by: Piyush Agarwal <[email protected]>
1 parent 557ccdc commit 1772dc1

File tree

3 files changed

+139
-165
lines changed

3 files changed

+139
-165
lines changed

monitoring/ceph-mixin/dashboards/cephfs.libsonnet

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -47,40 +47,42 @@ local g = import 'grafonnet/grafana.libsonnet';
4747
)
4848
.addPanels([
4949
$.addRowSchema(false, true, 'MDS Performance') + { gridPos: { x: 0, y: 0, w: 24, h: 1 } },
50-
$.simpleGraphPanel(
51-
{},
52-
'MDS Workload - $mds_servers',
53-
'',
54-
'none',
55-
'Reads(-) / Writes (+)',
56-
0,
57-
'sum(rate(ceph_objecter_op_r{ceph_daemon=~"($mds_servers).*", %(matchers)s}[$__rate_interval]))' % $.matchers(),
58-
'Read Ops',
59-
0,
60-
1,
61-
12,
62-
9
50+
$.timeSeriesPanel(
51+
title='MDS Workload - $mds_servers',
52+
datasource='$datasource',
53+
gridPosition={ x: 0, y: 1, w: 12, h: 9 },
54+
axisLabel='Reads(-) / Writes (+)',
55+
showPoints='never',
56+
min=0,
57+
spanNulls=true,
6358
)
64-
.addTarget($.addTargetSchema(
65-
'sum(rate(ceph_objecter_op_w{ceph_daemon=~"($mds_servers).*", %(matchers)s}[$__rate_interval]))' % $.matchers(),
66-
'Write Ops'
67-
))
59+
.addTargets([
60+
$.addTargetSchema(
61+
'sum(rate(ceph_objecter_op_r{ceph_daemon=~"($mds_servers).*", %(matchers)s}[$__rate_interval]))' % $.matchers(),
62+
'Read Ops'
63+
),
64+
$.addTargetSchema(
65+
'sum(rate(ceph_objecter_op_w{ceph_daemon=~"($mds_servers).*", %(matchers)s}[$__rate_interval]))' % $.matchers(),
66+
'Write Ops'
67+
),
68+
])
6869
.addSeriesOverride(
6970
{ alias: '/.*Reads/', transform: 'negative-Y' }
7071
),
71-
$.simpleGraphPanel(
72-
{},
73-
'Client Request Load - $mds_servers',
74-
'',
75-
'none',
76-
'Client Requests',
77-
0,
78-
'ceph_mds_server_handle_client_request{ceph_daemon=~"($mds_servers).*", %(matchers)s}' % $.matchers(),
79-
'{{ceph_daemon}}',
80-
12,
81-
1,
82-
12,
83-
9
84-
),
72+
$.timeSeriesPanel(
73+
title='Client Request Load - $mds_servers',
74+
datasource='$datasource',
75+
gridPosition={ x: 12, y: 1, w: 12, h: 9 },
76+
axisLabel='Client Requests',
77+
showPoints='never',
78+
min=0,
79+
spanNulls=true,
80+
)
81+
.addTargets([
82+
$.addTargetSchema(
83+
'ceph_mds_server_handle_client_request{ceph_daemon=~"($mds_servers).*", %(matchers)s}' % $.matchers(),
84+
'{{ceph_daemon}}'
85+
),
86+
]),
8587
]),
8688
}

monitoring/ceph-mixin/dashboards/timeseries_panel.libsonnet

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
axisPlacement='auto',
2121
barAlignment=0,
2222
drawStyle='line',
23-
fillOpacity=0,
23+
fillOpacity=8,
2424
gradientMode='none',
2525
lineInterpolation='linear',
26-
lineWidth=0,
26+
lineWidth=1,
2727
pointSize=0,
2828
scaleDistributionType='linear',
2929
showPoints='',
@@ -94,6 +94,7 @@
9494
},
9595
overrides: [],
9696
},
97+
seriesOverrides: [],
9798
options: {
9899
legend: {
99100
calcs: [],
@@ -137,5 +138,8 @@
137138
addThresholds(steps):: std.foldl(function(p, s) p.addThreshold(s), steps, self),
138139
addCalcs(calcs):: std.foldl(function(p, t) p.addCalc(t), calcs, self),
139140
addOverrides(overrides):: std.foldl(function(p, o) p.addOverride(o.matcher, o.properties), overrides, self),
141+
addSeriesOverride(override):: self {
142+
seriesOverrides+: [override],
143+
},
140144
},
141145
}

monitoring/ceph-mixin/dashboards_out/cephfs-overview.json

Lines changed: 100 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -57,60 +57,77 @@
5757
"type": "row"
5858
},
5959
{
60-
"aliasColors": { },
61-
"bars": false,
62-
"dashLength": 10,
63-
"dashes": false,
6460
"datasource": "$datasource",
65-
"description": "",
6661
"fieldConfig": {
6762
"defaults": {
63+
"color": {
64+
"mode": "palette-classic"
65+
},
6866
"custom": {
67+
"axisCenteredZero": false,
68+
"axisColorMode": "text",
69+
"axisLabel": "Reads(-) / Writes (+)",
70+
"axisPlacement": "auto",
71+
"barAlignment": 0,
72+
"drawStyle": "line",
6973
"fillOpacity": 8,
70-
"showPoints": "never"
74+
"gradientMode": "none",
75+
"hideFrom": {
76+
"legend": false,
77+
"tooltip": false,
78+
"viz": false
79+
},
80+
"lineInterpolation": "linear",
81+
"lineWidth": 1,
82+
"pointSize": 0,
83+
"scaleDistribution": {
84+
"type": "linear"
85+
},
86+
"showPoints": "never",
87+
"spanNulls": true,
88+
"stacking": {
89+
"group": "A",
90+
"mode": "none"
91+
},
92+
"thresholdsStyle": {
93+
"mode": "off"
94+
}
95+
},
96+
"min": 0,
97+
"thresholds": {
98+
"mode": "absolute",
99+
"steps": [ ]
71100
},
72101
"unit": "none"
73-
}
102+
},
103+
"overrides": [ ]
74104
},
75-
"fill": 1,
76-
"fillGradient": 0,
77105
"gridPos": {
78106
"h": 9,
79107
"w": 12,
80108
"x": 0,
81109
"y": 1
82110
},
83111
"id": 3,
84-
"legend": {
85-
"alignAsTable": false,
86-
"avg": false,
87-
"current": false,
88-
"max": false,
89-
"min": false,
90-
"rightSide": false,
91-
"show": true,
92-
"sideWidth": null,
93-
"total": false,
94-
"values": false
112+
"options": {
113+
"legend": {
114+
"calcs": [ ],
115+
"displayMode": "list",
116+
"placement": "bottom",
117+
"showLegend": true
118+
},
119+
"tooltip": {
120+
"mode": "multi",
121+
"sort": "none"
122+
}
95123
},
96-
"lines": true,
97-
"linewidth": 1,
98-
"links": [ ],
99-
"nullPointMode": "null",
100-
"percentage": false,
101-
"pointradius": 5,
102-
"points": false,
103-
"renderer": "flot",
104-
"repeat": null,
124+
"pluginVersion": "9.1.3",
105125
"seriesOverrides": [
106126
{
107127
"alias": "/.*Reads/",
108128
"transform": "negative-Y"
109129
}
110130
],
111-
"spaceLength": 10,
112-
"stack": false,
113-
"steppedLine": false,
114131
"targets": [
115132
{
116133
"expr": "sum(rate(ceph_objecter_op_r{ceph_daemon=~\"($mds_servers).*\", cluster=~\"$cluster\", }[$__rate_interval]))",
@@ -127,92 +144,76 @@
127144
"refId": "B"
128145
}
129146
],
130-
"thresholds": [ ],
131-
"timeFrom": null,
132-
"timeShift": null,
133147
"title": "MDS Workload - $mds_servers",
134-
"tooltip": {
135-
"shared": true,
136-
"sort": 0,
137-
"value_type": "individual"
138-
},
139-
"type": "timeseries",
140-
"xaxis": {
141-
"buckets": null,
142-
"mode": "time",
143-
"name": null,
144-
"show": true,
145-
"values": [ ]
146-
},
147-
"yaxes": [
148-
{
149-
"format": "none",
150-
"label": "Reads(-) / Writes (+)",
151-
"logBase": 1,
152-
"max": null,
153-
"min": 0,
154-
"show": true
155-
},
156-
{
157-
"format": "short",
158-
"label": null,
159-
"logBase": 1,
160-
"max": null,
161-
"min": 0,
162-
"show": true
163-
}
164-
]
148+
"type": "timeseries"
165149
},
166150
{
167-
"aliasColors": { },
168-
"bars": false,
169-
"dashLength": 10,
170-
"dashes": false,
171151
"datasource": "$datasource",
172-
"description": "",
173152
"fieldConfig": {
174153
"defaults": {
154+
"color": {
155+
"mode": "palette-classic"
156+
},
175157
"custom": {
158+
"axisCenteredZero": false,
159+
"axisColorMode": "text",
160+
"axisLabel": "Client Requests",
161+
"axisPlacement": "auto",
162+
"barAlignment": 0,
163+
"drawStyle": "line",
176164
"fillOpacity": 8,
177-
"showPoints": "never"
165+
"gradientMode": "none",
166+
"hideFrom": {
167+
"legend": false,
168+
"tooltip": false,
169+
"viz": false
170+
},
171+
"lineInterpolation": "linear",
172+
"lineWidth": 1,
173+
"pointSize": 0,
174+
"scaleDistribution": {
175+
"type": "linear"
176+
},
177+
"showPoints": "never",
178+
"spanNulls": true,
179+
"stacking": {
180+
"group": "A",
181+
"mode": "none"
182+
},
183+
"thresholdsStyle": {
184+
"mode": "off"
185+
}
186+
},
187+
"min": 0,
188+
"thresholds": {
189+
"mode": "absolute",
190+
"steps": [ ]
178191
},
179192
"unit": "none"
180-
}
193+
},
194+
"overrides": [ ]
181195
},
182-
"fill": 1,
183-
"fillGradient": 0,
184196
"gridPos": {
185197
"h": 9,
186198
"w": 12,
187199
"x": 12,
188200
"y": 1
189201
},
190202
"id": 4,
191-
"legend": {
192-
"alignAsTable": false,
193-
"avg": false,
194-
"current": false,
195-
"max": false,
196-
"min": false,
197-
"rightSide": false,
198-
"show": true,
199-
"sideWidth": null,
200-
"total": false,
201-
"values": false
203+
"options": {
204+
"legend": {
205+
"calcs": [ ],
206+
"displayMode": "list",
207+
"placement": "bottom",
208+
"showLegend": true
209+
},
210+
"tooltip": {
211+
"mode": "multi",
212+
"sort": "none"
213+
}
202214
},
203-
"lines": true,
204-
"linewidth": 1,
205-
"links": [ ],
206-
"nullPointMode": "null",
207-
"percentage": false,
208-
"pointradius": 5,
209-
"points": false,
210-
"renderer": "flot",
211-
"repeat": null,
215+
"pluginVersion": "9.1.3",
212216
"seriesOverrides": [ ],
213-
"spaceLength": 10,
214-
"stack": false,
215-
"steppedLine": false,
216217
"targets": [
217218
{
218219
"expr": "ceph_mds_server_handle_client_request{ceph_daemon=~\"($mds_servers).*\", cluster=~\"$cluster\", }",
@@ -222,41 +223,8 @@
222223
"refId": "A"
223224
}
224225
],
225-
"thresholds": [ ],
226-
"timeFrom": null,
227-
"timeShift": null,
228226
"title": "Client Request Load - $mds_servers",
229-
"tooltip": {
230-
"shared": true,
231-
"sort": 0,
232-
"value_type": "individual"
233-
},
234-
"type": "timeseries",
235-
"xaxis": {
236-
"buckets": null,
237-
"mode": "time",
238-
"name": null,
239-
"show": true,
240-
"values": [ ]
241-
},
242-
"yaxes": [
243-
{
244-
"format": "none",
245-
"label": "Client Requests",
246-
"logBase": 1,
247-
"max": null,
248-
"min": 0,
249-
"show": true
250-
},
251-
{
252-
"format": "short",
253-
"label": null,
254-
"logBase": 1,
255-
"max": null,
256-
"min": 0,
257-
"show": true
258-
}
259-
]
227+
"type": "timeseries"
260228
}
261229
],
262230
"refresh": "30s",

0 commit comments

Comments
 (0)