diff --git a/CHANGELOG.md b/CHANGELOG.md index ae90d4ca940..6db5b53246b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#6185](https://github.com/thanos-io/thanos/pull/6185) Tracing: tracing in OTLP support configuring service_name. - [#6192](https://github.com/thanos-io/thanos/pull/6192) Store: add flag `bucket-web-label` to select the label to use as timeline title in web UI - [#6167](https://github.com/thanos-io/thanos/pull/6195) Receive: add flag `tsdb.too-far-in-future.time-window` to prevent clock skewed samples to pollute TSDB head and block all valid incoming samples. +- [#6273](https://github.com/thanos-io/thanos/pull/6273) Mixin: Allow specifying an instance name filter in dashboards ### Fixed diff --git a/mixin/dashboards/defaults.libsonnet b/mixin/dashboards/defaults.libsonnet index 77ccc3e1e48..e176f010002 100644 --- a/mixin/dashboards/defaults.libsonnet +++ b/mixin/dashboards/defaults.libsonnet @@ -9,6 +9,7 @@ local utils = import '../lib/utils.libsonnet'; prefix: 'Thanos / ', tags: error 'must provide dashboard tags', timezone: 'UTC', + instance_name_filter: '', }, // Automatically add a uid to each dashboard based on the base64 encoding @@ -37,7 +38,13 @@ local utils = import '../lib/utils.libsonnet'; ], templating+: { - list+: [ + // Add optional filter to the datasource template variable + 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',