Skip to content

Commit

Permalink
Mixin: Allow specifying an instance name filter (#115)
Browse files Browse the repository at this point in the history
This commit allow specifying the instance name filter, in order to
filter the datasources shown on the dashboards.

Signed-off-by: Jacob Baungard Hansen <jacobbaungard@redhat.com>
  • Loading branch information
jacobbaungard authored Apr 13, 2023
1 parent 615c758 commit 1a5357d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions jsonnet/thanos-receive-controller-mixin/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
tags: ['thanos-receive-controller-mixin', 'observatorium'],
selector: ['%s="$%s"' % [level, level] for level in std.objectFields(thanos.hierarcies)],
aggregator: ['%s' % level for level in std.objectFields(thanos.hierarcies)],
instance_name_filter: '',
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
],

templating+: {
list+: [
list: [
if variable.name == 'datasource'
then variable { regex: thanos.dashboard.instance_name_filter }
else variable
for variable in super.list
] + [
template.interval(
'interval',
'5m,10m,30m,1h,6h,12h,auto',
Expand Down

0 comments on commit 1a5357d

Please sign in to comment.