Skip to content

Commit 1c13b3b

Browse files
committed
Tweaked timeseries panels to match best practices
1 parent f9c7f9c commit 1c13b3b

File tree

5 files changed

+76
-38
lines changed

5 files changed

+76
-38
lines changed

wildfly-mixin/dashboards_out/wildfly-datasource.json

Lines changed: 15 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wildfly-mixin/dashboards_out/wildfly-logs.json

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wildfly-mixin/dashboards_out/wildfly-overview.json

Lines changed: 25 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wildfly-mixin/links.libsonnet

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ local g = import './g.libsonnet';
1111
wildflyDatasource:
1212
link.link.new('Wildfly datasource', '/d/' + this.grafana.dashboards['wildfly-datasource.json'].uid)
1313
+ link.link.options.withKeepTime(true),
14-
15-
otherDashboards:
16-
link.dashboards.new('All dashboards', this.config.dashboardTags)
17-
+ link.dashboards.options.withIncludeVars(true)
18-
+ link.dashboards.options.withKeepTime(true)
19-
+ link.dashboards.options.withAsDropdown(true),
2014
}
2115
+
2216
if this.config.enableLokiLogs then

wildfly-mixin/panels.libsonnet

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ local commonlib = import 'common-lib/common/main.libsonnet';
1414
+ g.query.prometheus.withInterval('2m')
1515
+ g.query.prometheus.withIntervalFactor(2),
1616
])
17+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('smooth')
18+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(2)
19+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('never')
1720
+ g.panel.timeSeries.standardOptions.withUnit('reqps'),
1821

1922
requestErrorsPanel:
@@ -25,6 +28,9 @@ local commonlib = import 'common-lib/common/main.libsonnet';
2528
+ g.query.prometheus.withIntervalFactor(2),
2629
])
2730
+ g.panel.timeSeries.standardOptions.withUnit('reqps')
31+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('smooth')
32+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(2)
33+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('never')
2834
+ g.panel.timeSeries.standardOptions.thresholds.withSteps([
2935
{ color: 'green', value: null },
3036
{ color: 'red', value: 80 },
@@ -40,6 +46,9 @@ local commonlib = import 'common-lib/common/main.libsonnet';
4046
+ g.query.prometheus.withIntervalFactor(2),
4147
])
4248
+ g.panel.timeSeries.standardOptions.withUnit('binBps')
49+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('smooth')
50+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(2)
51+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('never')
4352
+ g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false),
4453

4554
networkSentThroughputPanel:
@@ -51,6 +60,9 @@ local commonlib = import 'common-lib/common/main.libsonnet';
5160
+ g.query.prometheus.withIntervalFactor(2),
5261
])
5362
+ g.panel.timeSeries.standardOptions.withUnit('binBps')
63+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('smooth')
64+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(2)
65+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('never')
5466
+ g.panel.timeSeries.standardOptions.thresholds.withSteps([
5567
{ color: 'green', value: null },
5668
{ color: 'red', value: 80 },
@@ -68,6 +80,9 @@ local commonlib = import 'common-lib/common/main.libsonnet';
6880
{ color: 'green', value: null },
6981
{ color: 'red', value: 80 },
7082
])
83+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('smooth')
84+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(2)
85+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('never')
7186
+ g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false),
7287

7388
sessionsExpiredPanel:
@@ -83,6 +98,9 @@ local commonlib = import 'common-lib/common/main.libsonnet';
8398
{ color: 'green', value: null },
8499
{ color: 'red', value: 80 },
85100
])
101+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('smooth')
102+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(2)
103+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('never')
86104
+ g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false),
87105

88106
sessionsRejectedPanel:
@@ -98,6 +116,9 @@ local commonlib = import 'common-lib/common/main.libsonnet';
98116
{ color: 'green', value: null },
99117
{ color: 'red', value: 80 },
100118
])
119+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('smooth')
120+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(2)
121+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('never')
101122
+ g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false),
102123

103124
connectionsActivePanel:
@@ -111,6 +132,9 @@ local commonlib = import 'common-lib/common/main.libsonnet';
111132
{ color: 'green', value: null },
112133
{ color: 'red', value: 80 },
113134
])
135+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('smooth')
136+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(2)
137+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('never')
114138
+ g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false),
115139

116140
connectionsIdlePanel:
@@ -124,6 +148,9 @@ local commonlib = import 'common-lib/common/main.libsonnet';
124148
{ color: 'green', value: null },
125149
{ color: 'red', value: 80 },
126150
])
151+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('smooth')
152+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(2)
153+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('never')
127154
+ g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false),
128155

129156
transactionsCreatedPanel:
@@ -138,6 +165,9 @@ local commonlib = import 'common-lib/common/main.libsonnet';
138165
{ color: 'green', value: null },
139166
{ color: 'red', value: 80 },
140167
])
168+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('smooth')
169+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(2)
170+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('never')
141171
+ g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false),
142172

143173
transactionsInFlightPanel:
@@ -151,6 +181,9 @@ local commonlib = import 'common-lib/common/main.libsonnet';
151181
{ color: 'green', value: null },
152182
{ color: 'red', value: 80 },
153183
])
184+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('smooth')
185+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(2)
186+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('never')
154187
+ g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false),
155188

156189
transactionsAbortedPanel:
@@ -165,6 +198,9 @@ local commonlib = import 'common-lib/common/main.libsonnet';
165198
{ color: 'green', value: null },
166199
{ color: 'red', value: 80 },
167200
])
201+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineInterpolation('smooth')
202+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withLineWidth(2)
203+
+ g.panel.timeSeries.fieldConfig.defaults.custom.withShowPoints('never')
168204
+ g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false),
169205
},
170206
}

0 commit comments

Comments
 (0)