-
Notifications
You must be signed in to change notification settings - Fork 162
/
Copy pathdashboards.libsonnet
54 lines (54 loc) · 2.19 KB
/
dashboards.libsonnet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
local g = import './g.libsonnet';
{
new(this):
{
'kafka-topic-dashboard.json':
g.dashboard.new(this.config.dashboardNamePrefix + 'Kafka topic overview')
+ g.dashboard.withVariables(
std.setUnion(
this.signals.topic.getVariablesMultiChoice(),
this.signals.consumerGroup.getVariablesMultiChoice(),
keyF=function(x) x.name
)
)
+ g.dashboard.withTags(this.config.dashboardTags)
+ g.dashboard.withUid(this.config.uid + '-kafka-topic-dashboard')
+ g.dashboard.withLinks(this.grafana.links.otherDashboards)
+ g.dashboard.withPanels(
g.util.panel.resolveCollapsedFlagOnRows(
g.util.grid.wrapPanels(
[
this.grafana.rows.topic,
this.grafana.rows.consumerGroup,
]
)
), setPanelIDs=false
),
'kafka-overview-dashboard.json':
g.dashboard.new(this.config.dashboardNamePrefix + 'Kafka overview')
+ g.dashboard.withVariables(this.signals.broker.getVariablesMultiChoice())
+ g.dashboard.withTags(this.config.dashboardTags)
+ g.dashboard.withUid(this.config.uid + '-kafka-overview-dashboard')
+ g.dashboard.withLinks(this.grafana.links.otherDashboards)
+ g.dashboard.withPanels(
g.util.panel.resolveCollapsedFlagOnRows(
g.util.grid.wrapPanels(
[
this.grafana.rows.overview,
this.grafana.rows.throughput,
this.grafana.rows.replication,
this.grafana.rows.totalTimePerformance,
this.grafana.rows.messageConversion,
]
+ (if this.config.zookeeperEnabled then [this.grafana.rows.zookeeperClient] else [])
+ [
this.grafana.rows.jvm.process + g.panel.row.withCollapsed(false),
this.grafana.rows.jvm.overview + g.panel.row.withCollapsed(true),
this.grafana.rows.jvm.memory + g.panel.row.withCollapsed(true),
this.grafana.rows.jvm.threads + g.panel.row.withCollapsed(true),
]
)
), setPanelIDs=false
),
},
}