Skip to content

Commit

Permalink
enhance(mixins): Allow hiding useless rows in loki-operational
Browse files Browse the repository at this point in the history
Signed-off-by: QuentinBisson <[email protected]>
  • Loading branch information
QuentinBisson committed Jul 24, 2024
1 parent 7aa7c15 commit c765862
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
19 changes: 19 additions & 0 deletions production/loki-mixin/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,25 @@
enabled: true,
},

operational: {
// Whether or not to include memcached in the operational dashboard
memcached: true,
// Whether or not to include consul in the operational dashboard
consul: true,
// Whether or not to include big table in the operational dashboard
bigTable: true,
// Whether or not to include dynamo in the operational dashboard
dynamo: true,
// Whether or not to include gcs in the operational dashboard
gcs: true,
// Whether or not to include s3 in the operational dashboard
s3: true,
// Whether or not to include azure blob in the operational dashboard
azureBlob: true,
// Whether or not to include bolt db in the operational dashboard
boltDB: true,
},

// Enable TSDB specific dashboards
tsdb: true,

Expand Down
11 changes: 9 additions & 2 deletions production/loki-mixin/dashboards/loki-operational.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ local utils = import 'mixin-utils/utils.libsonnet';

hiddenRows:: [
'Cassandra',
] + if !$._config.ssd.enabled then [] else [
'Ingester',
if $._config.ssd.enabled then 'Ingester',
if !$._config.operational.memcached then 'Memcached',
if !$._config.operational.consul then 'Consul',
if !$._config.operational.bigTable then 'Big Table',
if !$._config.operational.dynamo then 'Dynamo',
if !$._config.operational.gcs then 'GCS',
if !$._config.operational.s3 then 'S3',
if !$._config.operational.azureBlob then 'Azure Blob',
if !$._config.operational.boltDB then 'BoltDB Shipper',
],

hiddenPanels:: if $._config.promtail.enabled then [] else [
Expand Down
2 changes: 2 additions & 0 deletions production/loki-mixin/mixin.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
(import 'alerts.libsonnet') +
(import 'recording_rules.libsonnet') + {
grafanaDashboardFolder: 'Loki',
// Without this, configs is not taken into account
_config+:: {},
}

0 comments on commit c765862

Please sign in to comment.