Skip to content

Commit 3aa4f22

Browse files
feat(mixins): Allow hiding useless rows in loki-operational (#13646)
Signed-off-by: QuentinBisson <quentin@giantswarm.io>
1 parent b90b863 commit 3aa4f22

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

‎production/loki-mixin/config.libsonnet

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,25 @@
2020
enabled: true,
2121
},
2222

23+
operational: {
24+
// Whether or not to include memcached in the operational dashboard
25+
memcached: true,
26+
// Whether or not to include consul in the operational dashboard
27+
consul: true,
28+
// Whether or not to include big table in the operational dashboard
29+
bigTable: true,
30+
// Whether or not to include dynamo in the operational dashboard
31+
dynamo: true,
32+
// Whether or not to include gcs in the operational dashboard
33+
gcs: true,
34+
// Whether or not to include s3 in the operational dashboard
35+
s3: true,
36+
// Whether or not to include azure blob in the operational dashboard
37+
azureBlob: true,
38+
// Whether or not to include bolt db in the operational dashboard
39+
boltDB: true,
40+
},
41+
2342
// Enable TSDB specific dashboards
2443
tsdb: true,
2544

‎production/loki-mixin/dashboards/loki-operational.libsonnet

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@ local utils = import 'mixin-utils/utils.libsonnet';
1414

1515
hiddenRows:: [
1616
'Cassandra',
17-
] + if !$._config.ssd.enabled then [] else [
18-
'Ingester',
17+
if $._config.ssd.enabled then 'Ingester',
18+
if !$._config.operational.memcached then 'Memcached',
19+
if !$._config.operational.consul then 'Consul',
20+
if !$._config.operational.bigTable then 'Big Table',
21+
if !$._config.operational.dynamo then 'Dynamo',
22+
if !$._config.operational.gcs then 'GCS',
23+
if !$._config.operational.s3 then 'S3',
24+
if !$._config.operational.azureBlob then 'Azure Blob',
25+
if !$._config.operational.boltDB then 'BoltDB Shipper',
1926
],
2027

2128
hiddenPanels:: if $._config.promtail.enabled then [] else [

‎production/loki-mixin/mixin.libsonnet

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
(import 'alerts.libsonnet') +
33
(import 'recording_rules.libsonnet') + {
44
grafanaDashboardFolder: 'Loki',
5+
// Without this, configs is not taken into account
6+
_config+:: {},
57
}

0 commit comments

Comments
 (0)