Skip to content

Commit cadc824

Browse files
feat(loki-mixin): allow disabling thanos dashboard and fix dashboard's file name (#18749)
Co-authored-by: J Stickler <[email protected]>
1 parent 490f38d commit cadc824

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

production/loki-mixin/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ To test the dashboards against a local grafana & Loki setup perform the followin
99
### Pre-requisites
1010

1111
* jb is a jsonnet package manager
12-
To install it follow the instructions at: https://github.com/jsonnet-bundler/jsonnet-bundler.
12+
To install it follow the instructions at: <https://github.com/jsonnet-bundler/jsonnet-bundler>.
1313

14-
* Grizzly is a tool for managing jsonnet dashboards in Grafana: https://github.com/grafana/grizzly.
15-
To install it follow the instructions at: https://grafana.github.io/grizzly/installation/.
14+
* Grizzly is a tool for managing jsonnet dashboards in Grafana: <https://github.com/grafana/grizzly>.
15+
To install it follow the instructions at: <https://grafana.github.io/grizzly/installation/>.
1616

1717
* Make sure you have the latest dependencies in the `vendor` directory by running the following command in `production/loki-mixin`:
1818

1919
```shell
2020
jb install
2121
```
2222

23-
* On your Grafana instance create an API key with role 'Admin' under Configuration > API keys.
23+
* On your Grafana instance create an API key with role 'Admin' under Configuration > API keys.
2424
Copy this key for the next step.
2525

2626
### Testing dashboards

production/loki-mixin/config.libsonnet

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
enabled: true,
4949
},
5050

51+
thanos: {
52+
// Whether or not to include thanos specific dashboards
53+
enabled: true,
54+
},
55+
5156
operational: {
5257
// Whether or not to include memcached in the operational dashboard
5358
memcached: true,

production/loki-mixin/dashboards/loki-object-store.libsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ local grafana = import 'grafonnet/grafana.libsonnet';
22
local row = grafana.row;
33

44
{
5-
grafanaDashboards+:: {
5+
grafanaDashboards+:: if !$._config.thanos.enabled then {} else {
66
local cluster_namespace_matcher = 'cluster="$cluster", namespace=~"$namespace"',
77
local dashboard = (
88
(import 'dashboard-utils.libsonnet') + {
99
_config+:: $._config,
1010
}
1111
),
12-
'loki_thanos_object_storage.json':
12+
'loki-thanos-object-storage.json':
1313
dashboard.dashboard('Loki / Object Store Thanos', uid='object-store')
1414
.addCluster()
1515
.addNamespace()

0 commit comments

Comments
 (0)