Skip to content

Commit c2f4aa7

Browse files
author
Aashish Sharma
committed
mgr/dashboard: replace deprecated table panel in grafana with a newer
table panel Fixes: https://tracker.ceph.com/issues/65174 Signed-off-by: Aashish Sharma <[email protected]>
1 parent 50d48d9 commit c2f4aa7

File tree

13 files changed

+2229
-975
lines changed

13 files changed

+2229
-975
lines changed

monitoring/ceph-mixin/dashboards/host.libsonnet

Lines changed: 63 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -719,19 +719,70 @@ local g = import 'grafonnet/grafana.libsonnet';
719719
11,
720720
9
721721
),
722-
$.addTableSchema(
723-
'$datasource',
724-
'This table shows the 10 hosts with the highest number of slow ops',
725-
{ col: 2, desc: true },
726-
[
727-
$.overviewStyle('Instance', 'instance', 'string', 'short'),
728-
$.overviewStyle('Slow Ops', 'Value', 'number', 'none'),
729-
$.overviewStyle('', '/.*/', 'hidden', 'short'),
722+
723+
$.addTableExtended(
724+
datasource='${datasource}',
725+
title='Top Slow Ops per Host',
726+
gridPosition={ h: 8, w: 6, x: 0, y: 30 },
727+
options={
728+
footer: {
729+
fields: '',
730+
reducer: ['sum'],
731+
countRows: false,
732+
enablePagination: false,
733+
show: false,
734+
},
735+
frameIndex: 1,
736+
showHeader: true,
737+
},
738+
custom={ align: 'null', cellOptions: { type: 'auto' }, filterable: true, inspect: false },
739+
thresholds={
740+
mode: 'absolute',
741+
steps: [
742+
{ color: 'green', value: null },
743+
{ color: 'red', value: 80 },
744+
],
745+
},
746+
overrides=[
747+
{
748+
matcher: { id: 'byName', options: 'instance' },
749+
properties: [
750+
{ id: 'displayName', value: 'Instance' },
751+
{ id: 'unit', value: 'short' },
752+
{ id: 'decimals', value: 2 },
753+
{ id: 'custom.align', value: null },
754+
],
755+
},
756+
{
757+
matcher: { id: 'byName', options: 'Value' },
758+
properties: [
759+
{ id: 'displayName', value: 'Slow Ops' },
760+
{ id: 'unit', value: 'none' },
761+
{ id: 'decimals', value: 2 },
762+
{ id: 'custom.align', value: null },
763+
],
764+
},
730765
],
731-
'Top Slow Ops per Host',
732-
'table'
766+
pluginVersion='10.4.0'
733767
)
734-
.addTarget(
768+
.addTransformations([
769+
{
770+
id: 'merge',
771+
options: { reducers: [] },
772+
}
773+
{
774+
id: 'organize',
775+
options: {
776+
excludeByName: {
777+
Time: true,
778+
cluster: true,
779+
},
780+
indexByName: {},
781+
renameByName: {},
782+
includeByName: {},
783+
},
784+
},
785+
]).addTarget(
735786
$.addTargetSchema(
736787
|||
737788
topk(10,
@@ -743,6 +794,6 @@ local g = import 'grafonnet/grafana.libsonnet';
743794
1,
744795
true
745796
)
746-
) + { gridPos: { x: 0, y: 40, w: 4, h: 8 } },
797+
),
747798
]),
748799
}

monitoring/ceph-mixin/dashboards/osd.libsonnet

Lines changed: 206 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,70 @@ local g = import 'grafonnet/grafana.libsonnet';
9090
),
9191
],
9292
),
93-
$.addTableSchema(
94-
'$datasource',
95-
"This table shows the osd's that are delivering the 10 highest read latencies within the cluster",
96-
{ col: 2, desc: true },
97-
[
98-
$.overviewStyle('OSD ID', 'ceph_daemon', 'string', 'short'),
99-
$.overviewStyle('Latency (ms)', 'Value', 'number', 'none'),
100-
$.overviewStyle('', '/.*/', 'hidden', 'short'),
93+
94+
$.addTableExtended(
95+
datasource='${datasource}',
96+
title='Highest READ Latencies',
97+
gridPosition={ h: 8, w: 4, x: 8, y: 0 },
98+
options={
99+
footer: {
100+
fields: '',
101+
reducer: ['sum'],
102+
countRows: false,
103+
enablePagination: false,
104+
show: false,
105+
},
106+
frameIndex: 1,
107+
showHeader: true,
108+
},
109+
custom={ align: 'null', cellOptions: { type: 'auto' }, filterable: true, inspect: false },
110+
thresholds={
111+
mode: 'absolute',
112+
steps: [
113+
{ color: 'green', value: null },
114+
{ color: 'red', value: 80 },
115+
],
116+
},
117+
overrides=[
118+
{
119+
matcher: { id: 'byName', options: 'ceph_daemon' },
120+
properties: [
121+
{ id: 'displayName', value: 'OSD ID' },
122+
{ id: 'unit', value: 'short' },
123+
{ id: 'decimals', value: 2 },
124+
{ id: 'custom.align', value: null },
125+
],
126+
},
127+
{
128+
matcher: { id: 'byName', options: 'Value' },
129+
properties: [
130+
{ id: 'displayName', value: 'Latency (ms)' },
131+
{ id: 'unit', value: 'none' },
132+
{ id: 'decimals', value: 2 },
133+
{ id: 'custom.align', value: null },
134+
],
135+
},
101136
],
102-
'Highest READ Latencies',
103-
'table'
137+
pluginVersion='10.4.0'
104138
)
105-
.addTarget(
139+
.addTransformations([
140+
{
141+
id: 'merge',
142+
options: { reducers: [] },
143+
},
144+
{
145+
id: 'organize',
146+
options: {
147+
excludeByName: {
148+
Time: true,
149+
cluster: true,
150+
},
151+
indexByName: {},
152+
renameByName: {},
153+
includeByName: {},
154+
},
155+
},
156+
]).addTarget(
106157
$.addTargetSchema(
107158
|||
108159
topk(10,
@@ -120,7 +171,8 @@ local g = import 'grafonnet/grafana.libsonnet';
120171
1,
121172
true
122173
)
123-
) + { gridPos: { x: 8, y: 0, w: 4, h: 8 } },
174+
),
175+
124176
$.simpleGraphPanel(
125177
{
126178
'@95%ile write': '#e0752d',
@@ -165,21 +217,80 @@ local g = import 'grafonnet/grafana.libsonnet';
165217
),
166218
],
167219
),
168-
$.addTableSchema(
169-
'$datasource',
170-
"This table shows the osd's that are delivering the 10 highest write latencies within the cluster",
171-
{ col: 2, desc: true },
172-
[
173-
$.overviewStyle(
174-
'OSD ID', 'ceph_daemon', 'string', 'short'
175-
),
176-
$.overviewStyle('Latency (ms)', 'Value', 'number', 'none'),
177-
$.overviewStyle('', '/.*/', 'hidden', 'short'),
220+
221+
$.addTableExtended(
222+
datasource='${datasource}',
223+
title='Highest WRITE Latencies',
224+
description="This table shows the osd's that are delivering the 10 highest write latencies within the cluster",
225+
gridPosition={ h: 8, w: 4, x: 20, y: 0 },
226+
options={
227+
footer: {
228+
fields: '',
229+
reducer: ['sum'],
230+
countRows: false,
231+
enablePagination: false,
232+
show: false,
233+
},
234+
frameIndex: 1,
235+
showHeader: true,
236+
},
237+
custom={ align: 'null', cellOptions: { type: 'auto' }, filterable: true, inspect: false },
238+
thresholds={
239+
mode: 'absolute',
240+
steps: [
241+
{ color: 'green', value: null },
242+
{ color: 'red', value: 80 },
243+
],
244+
},
245+
overrides=[
246+
{
247+
matcher: { id: 'byName', options: 'ceph_daemon' },
248+
properties: [
249+
{ id: 'displayName', value: 'OSD ID' },
250+
{ id: 'unit', value: 'short' },
251+
{ id: 'decimals', value: 2 },
252+
{ id: 'custom.align', value: null },
253+
],
254+
},
255+
{
256+
matcher: { id: 'byName', options: 'Value' },
257+
properties: [
258+
{ id: 'displayName', value: 'Latency (ms)' },
259+
{ id: 'unit', value: 'none' },
260+
{ id: 'decimals', value: 2 },
261+
{ id: 'custom.align', value: null },
262+
],
263+
},
264+
{
265+
matcher: { id: 'byName', options: 'Value' },
266+
properties: [
267+
{ id: 'mappings', value: [{ type: 'value', options: { NaN: { text: '0.00', index: 0 } } }] },
268+
{ id: 'unit', value: 'none' },
269+
{ id: 'decimals', value: 2 },
270+
{ id: 'custom.align', value: null },
271+
],
272+
},
178273
],
179-
'Highest WRITE Latencies',
180-
'table'
274+
pluginVersion='10.4.0'
181275
)
182-
.addTarget(
276+
.addTransformations([
277+
{
278+
id: 'merge',
279+
options: { reducers: [] },
280+
},
281+
{
282+
id: 'organize',
283+
options: {
284+
excludeByName: {
285+
Time: true,
286+
cluster: true,
287+
},
288+
indexByName: {},
289+
renameByName: {},
290+
includeByName: {},
291+
},
292+
},
293+
]).addTarget(
183294
$.addTargetSchema(
184295
|||
185296
topk(10,
@@ -195,7 +306,8 @@ local g = import 'grafonnet/grafana.libsonnet';
195306
1,
196307
true
197308
)
198-
) + { gridPos: { x: 20, y: 0, w: 4, h: 8 } },
309+
),
310+
199311
$.pieChartPanel('OSD Types Summary', '', '$datasource', { x: 0, y: 8, w: 4, h: 8 }, 'table', 'bottom', true, ['percent'], { mode: 'single', sort: 'none' }, 'pie', ['percent', 'value'], 'palette-classic')
200312
.addTarget(
201313
$.addTargetSchema('count by (device_class) (ceph_osd_metadata{%(matchers)s})' % $.matchers(), '{{device_class}}')
@@ -291,19 +403,75 @@ local g = import 'grafonnet/grafana.libsonnet';
291403
.addTargets([$.addTargetSchema(
292404
'round(sum(rate(ceph_pool_wr{%(matchers)s}[$__rate_interval])))' % $.matchers(), 'Writes'
293405
)]),
294-
$.addTableSchema(
295-
'$datasource',
296-
'This table shows the 10 OSDs with the highest number of slow ops',
297-
{ col: 2, desc: true },
298-
[
299-
$.overviewStyle('OSD ID', 'ceph_daemon', 'string', 'short'),
300-
$.overviewStyle('Slow Ops', 'Value', 'number', 'none'),
301-
$.overviewStyle('', '/.*/', 'hidden', 'short'),
406+
407+
$.addTableExtended(
408+
datasource='${datasource}',
409+
title='Top Slow Ops',
410+
description='This table shows the 10 OSDs with the highest number of slow ops',
411+
gridPosition={ h: 8, w: 5, x: 0, y: 25 },
412+
options={
413+
footer: {
414+
fields: '',
415+
reducer: ['sum'],
416+
countRows: false,
417+
enablePagination: false,
418+
show: false,
419+
},
420+
frameIndex: 1,
421+
showHeader: true,
422+
},
423+
custom={ align: 'null', cellOptions: { type: 'auto' }, filterable: true, inspect: false },
424+
thresholds={
425+
mode: 'absolute',
426+
steps: [
427+
{ color: 'green', value: null },
428+
{ color: 'red', value: 80 },
429+
],
430+
},
431+
overrides=[
432+
{
433+
matcher: { id: 'byName', options: 'ceph_daemon' },
434+
properties: [
435+
{ id: 'displayName', value: 'OSD ID' },
436+
{ id: 'unit', value: 'short' },
437+
{ id: 'decimals', value: 2 },
438+
{ id: 'custom.align', value: null },
439+
],
440+
},
441+
{
442+
matcher: { id: 'byName', options: 'Value' },
443+
properties: [
444+
{ id: 'displayName', value: 'Slow Ops' },
445+
{ id: 'unit', value: 'none' },
446+
{ id: 'decimals', value: 2 },
447+
{ id: 'custom.align', value: null },
448+
],
449+
},
302450
],
303-
'Top Slow Ops',
304-
'table'
451+
pluginVersion='10.4.0'
305452
)
306-
.addTarget(
453+
.addTransformations([
454+
{
455+
id: 'merge',
456+
options: { reducers: [] },
457+
},
458+
{
459+
id: 'organize',
460+
options: {
461+
excludeByName: {
462+
Time: true,
463+
__name__: true,
464+
instance: true,
465+
job: true,
466+
type: true,
467+
cluster: true,
468+
},
469+
indexByName: {},
470+
renameByName: {},
471+
includeByName: {},
472+
},
473+
},
474+
]).addTarget(
307475
$.addTargetSchema(
308476
|||
309477
topk(10,
@@ -315,7 +483,7 @@ local g = import 'grafonnet/grafana.libsonnet';
315483
1,
316484
true
317485
)
318-
) + { gridPos: { x: 0, y: 20, w: 4, h: 8 } },
486+
),
319487
]),
320488
'osd-device-details.json':
321489
local OsdDeviceDetailsPanel(title,

0 commit comments

Comments
 (0)