Skip to content

Commit ca651ae

Browse files
authored
Merge pull request ceph#61210 from piyushagarwal1411/cephfs
mgr/dashboard: Changing SimpleGraphPanel to TimeSeries Panel in cephfs.libsonnet to fix inconsistency in Line Graphs Reviewed-by: Aashish Sharma <[email protected]>
2 parents abd2620 + 1772dc1 commit ca651ae

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
@@ -61,40 +61,42 @@ local g = import 'grafonnet/grafana.libsonnet';
6161
])
6262
.addPanels([
6363
$.addRowSchema(false, true, 'MDS Performance') + { gridPos: { x: 0, y: 0, w: 24, h: 1 } },
64-
$.simpleGraphPanel(
65-
{},
66-
'MDS Workload - $mds_servers',
67-
'',
68-
'none',
69-
'Reads(-) / Writes (+)',
70-
0,
71-
'sum(rate(ceph_objecter_op_r{ceph_daemon=~"($mds_servers).*", %(matchers)s}[$__rate_interval]))' % $.matchers(),
72-
'Read Ops',
73-
0,
74-
1,
75-
12,
76-
9
64+
$.timeSeriesPanel(
65+
title='MDS Workload - $mds_servers',
66+
datasource='$datasource',
67+
gridPosition={ x: 0, y: 1, w: 12, h: 9 },
68+
axisLabel='Reads(-) / Writes (+)',
69+
showPoints='never',
70+
min=0,
71+
spanNulls=true,
7772
)
78-
.addTarget($.addTargetSchema(
79-
'sum(rate(ceph_objecter_op_w{ceph_daemon=~"($mds_servers).*", %(matchers)s}[$__rate_interval]))' % $.matchers(),
80-
'Write Ops'
81-
))
73+
.addTargets([
74+
$.addTargetSchema(
75+
'sum(rate(ceph_objecter_op_r{ceph_daemon=~"($mds_servers).*", %(matchers)s}[$__rate_interval]))' % $.matchers(),
76+
'Read Ops'
77+
),
78+
$.addTargetSchema(
79+
'sum(rate(ceph_objecter_op_w{ceph_daemon=~"($mds_servers).*", %(matchers)s}[$__rate_interval]))' % $.matchers(),
80+
'Write Ops'
81+
),
82+
])
8283
.addSeriesOverride(
8384
{ alias: '/.*Reads/', transform: 'negative-Y' }
8485
),
85-
$.simpleGraphPanel(
86-
{},
87-
'Client Request Load - $mds_servers',
88-
'',
89-
'none',
90-
'Client Requests',
91-
0,
92-
'ceph_mds_server_handle_client_request{ceph_daemon=~"($mds_servers).*", %(matchers)s}' % $.matchers(),
93-
'{{ceph_daemon}}',
94-
12,
95-
1,
96-
12,
97-
9
98-
),
86+
$.timeSeriesPanel(
87+
title='Client Request Load - $mds_servers',
88+
datasource='$datasource',
89+
gridPosition={ x: 12, y: 1, w: 12, h: 9 },
90+
axisLabel='Client Requests',
91+
showPoints='never',
92+
min=0,
93+
spanNulls=true,
94+
)
95+
.addTargets([
96+
$.addTargetSchema(
97+
'ceph_mds_server_handle_client_request{ceph_daemon=~"($mds_servers).*", %(matchers)s}' % $.matchers(),
98+
'{{ceph_daemon}}'
99+
),
100+
]),
99101
]),
100102
}

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
@@ -70,60 +70,77 @@
7070
"type": "row"
7171
},
7272
{
73-
"aliasColors": { },
74-
"bars": false,
75-
"dashLength": 10,
76-
"dashes": false,
7773
"datasource": "$datasource",
78-
"description": "",
7974
"fieldConfig": {
8075
"defaults": {
76+
"color": {
77+
"mode": "palette-classic"
78+
},
8179
"custom": {
80+
"axisCenteredZero": false,
81+
"axisColorMode": "text",
82+
"axisLabel": "Reads(-) / Writes (+)",
83+
"axisPlacement": "auto",
84+
"barAlignment": 0,
85+
"drawStyle": "line",
8286
"fillOpacity": 8,
83-
"showPoints": "never"
87+
"gradientMode": "none",
88+
"hideFrom": {
89+
"legend": false,
90+
"tooltip": false,
91+
"viz": false
92+
},
93+
"lineInterpolation": "linear",
94+
"lineWidth": 1,
95+
"pointSize": 0,
96+
"scaleDistribution": {
97+
"type": "linear"
98+
},
99+
"showPoints": "never",
100+
"spanNulls": true,
101+
"stacking": {
102+
"group": "A",
103+
"mode": "none"
104+
},
105+
"thresholdsStyle": {
106+
"mode": "off"
107+
}
108+
},
109+
"min": 0,
110+
"thresholds": {
111+
"mode": "absolute",
112+
"steps": [ ]
84113
},
85114
"unit": "none"
86-
}
115+
},
116+
"overrides": [ ]
87117
},
88-
"fill": 1,
89-
"fillGradient": 0,
90118
"gridPos": {
91119
"h": 9,
92120
"w": 12,
93121
"x": 0,
94122
"y": 1
95123
},
96124
"id": 3,
97-
"legend": {
98-
"alignAsTable": false,
99-
"avg": false,
100-
"current": false,
101-
"max": false,
102-
"min": false,
103-
"rightSide": false,
104-
"show": true,
105-
"sideWidth": null,
106-
"total": false,
107-
"values": false
125+
"options": {
126+
"legend": {
127+
"calcs": [ ],
128+
"displayMode": "list",
129+
"placement": "bottom",
130+
"showLegend": true
131+
},
132+
"tooltip": {
133+
"mode": "multi",
134+
"sort": "none"
135+
}
108136
},
109-
"lines": true,
110-
"linewidth": 1,
111-
"links": [ ],
112-
"nullPointMode": "null",
113-
"percentage": false,
114-
"pointradius": 5,
115-
"points": false,
116-
"renderer": "flot",
117-
"repeat": null,
137+
"pluginVersion": "9.1.3",
118138
"seriesOverrides": [
119139
{
120140
"alias": "/.*Reads/",
121141
"transform": "negative-Y"
122142
}
123143
],
124-
"spaceLength": 10,
125-
"stack": false,
126-
"steppedLine": false,
127144
"targets": [
128145
{
129146
"expr": "sum(rate(ceph_objecter_op_r{ceph_daemon=~\"($mds_servers).*\", cluster=~\"$cluster\", }[$__rate_interval]))",
@@ -140,92 +157,76 @@
140157
"refId": "B"
141158
}
142159
],
143-
"thresholds": [ ],
144-
"timeFrom": null,
145-
"timeShift": null,
146160
"title": "MDS Workload - $mds_servers",
147-
"tooltip": {
148-
"shared": true,
149-
"sort": 0,
150-
"value_type": "individual"
151-
},
152-
"type": "timeseries",
153-
"xaxis": {
154-
"buckets": null,
155-
"mode": "time",
156-
"name": null,
157-
"show": true,
158-
"values": [ ]
159-
},
160-
"yaxes": [
161-
{
162-
"format": "none",
163-
"label": "Reads(-) / Writes (+)",
164-
"logBase": 1,
165-
"max": null,
166-
"min": 0,
167-
"show": true
168-
},
169-
{
170-
"format": "short",
171-
"label": null,
172-
"logBase": 1,
173-
"max": null,
174-
"min": 0,
175-
"show": true
176-
}
177-
]
161+
"type": "timeseries"
178162
},
179163
{
180-
"aliasColors": { },
181-
"bars": false,
182-
"dashLength": 10,
183-
"dashes": false,
184164
"datasource": "$datasource",
185-
"description": "",
186165
"fieldConfig": {
187166
"defaults": {
167+
"color": {
168+
"mode": "palette-classic"
169+
},
188170
"custom": {
171+
"axisCenteredZero": false,
172+
"axisColorMode": "text",
173+
"axisLabel": "Client Requests",
174+
"axisPlacement": "auto",
175+
"barAlignment": 0,
176+
"drawStyle": "line",
189177
"fillOpacity": 8,
190-
"showPoints": "never"
178+
"gradientMode": "none",
179+
"hideFrom": {
180+
"legend": false,
181+
"tooltip": false,
182+
"viz": false
183+
},
184+
"lineInterpolation": "linear",
185+
"lineWidth": 1,
186+
"pointSize": 0,
187+
"scaleDistribution": {
188+
"type": "linear"
189+
},
190+
"showPoints": "never",
191+
"spanNulls": true,
192+
"stacking": {
193+
"group": "A",
194+
"mode": "none"
195+
},
196+
"thresholdsStyle": {
197+
"mode": "off"
198+
}
199+
},
200+
"min": 0,
201+
"thresholds": {
202+
"mode": "absolute",
203+
"steps": [ ]
191204
},
192205
"unit": "none"
193-
}
206+
},
207+
"overrides": [ ]
194208
},
195-
"fill": 1,
196-
"fillGradient": 0,
197209
"gridPos": {
198210
"h": 9,
199211
"w": 12,
200212
"x": 12,
201213
"y": 1
202214
},
203215
"id": 4,
204-
"legend": {
205-
"alignAsTable": false,
206-
"avg": false,
207-
"current": false,
208-
"max": false,
209-
"min": false,
210-
"rightSide": false,
211-
"show": true,
212-
"sideWidth": null,
213-
"total": false,
214-
"values": false
216+
"options": {
217+
"legend": {
218+
"calcs": [ ],
219+
"displayMode": "list",
220+
"placement": "bottom",
221+
"showLegend": true
222+
},
223+
"tooltip": {
224+
"mode": "multi",
225+
"sort": "none"
226+
}
215227
},
216-
"lines": true,
217-
"linewidth": 1,
218-
"links": [ ],
219-
"nullPointMode": "null",
220-
"percentage": false,
221-
"pointradius": 5,
222-
"points": false,
223-
"renderer": "flot",
224-
"repeat": null,
228+
"pluginVersion": "9.1.3",
225229
"seriesOverrides": [ ],
226-
"spaceLength": 10,
227-
"stack": false,
228-
"steppedLine": false,
229230
"targets": [
230231
{
231232
"expr": "ceph_mds_server_handle_client_request{ceph_daemon=~\"($mds_servers).*\", cluster=~\"$cluster\", }",
@@ -235,41 +236,8 @@
235236
"refId": "A"
236237
}
237238
],
238-
"thresholds": [ ],
239-
"timeFrom": null,
240-
"timeShift": null,
241239
"title": "Client Request Load - $mds_servers",
242-
"tooltip": {
243-
"shared": true,
244-
"sort": 0,
245-
"value_type": "individual"
246-
},
247-
"type": "timeseries",
248-
"xaxis": {
249-
"buckets": null,
250-
"mode": "time",
251-
"name": null,
252-
"show": true,
253-
"values": [ ]
254-
},
255-
"yaxes": [
256-
{
257-
"format": "none",
258-
"label": "Client Requests",
259-
"logBase": 1,
260-
"max": null,
261-
"min": 0,
262-
"show": true
263-
},
264-
{
265-
"format": "short",
266-
"label": null,
267-
"logBase": 1,
268-
"max": null,
269-
"min": 0,
270-
"show": true
271-
}
272-
]
240+
"type": "timeseries"
273241
}
274242
],
275243
"refresh": "30s",

0 commit comments

Comments
 (0)