Skip to content

Commit

Permalink
Add grafanaDashboardFolder fields to mixins. (grafana#236)
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Wilkie <[email protected]>
  • Loading branch information
tomwilkie authored Apr 9, 2020
1 parent 5490026 commit 2c35184
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.DS_Store
vendor
jsonnetfile.lock.json
*.zip
1 change: 1 addition & 0 deletions consul-mixin/mixin.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
grafanaDashboardFolder: 'Consul',
_config+:: {
consul_replicas: 3,
},
Expand Down
4 changes: 3 additions & 1 deletion jaeger-mixin/mixin.libsonnet
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
(import 'dashboards.libsonnet') +
(import 'alerts.libsonnet')
(import 'alerts.libsonnet') {
grafanaDashboardFolder: 'Jaeger',
}
6 changes: 6 additions & 0 deletions memcached-mixin/dashboards.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
local mixin = import 'mixin.libsonnet';

{
[name]: std.manifestJsonEx(mixin.grafanaDashboards[name], ' ')
for name in std.objectFields(mixin.grafanaDashboards)
}
4 changes: 3 additions & 1 deletion memcached-mixin/mixin.libsonnet
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
(import 'dashboards.libsonnet')
(import 'dashboards.libsonnet') {
grafanaDashboardFolder: 'Memcached',
}

0 comments on commit 2c35184

Please sign in to comment.