Skip to content

Commit

Permalink
Merge pull request #407 from aallawala/aja_datasource_selector
Browse files Browse the repository at this point in the history
add ability to override datasource for dashboards
  • Loading branch information
pracucci authored Oct 20, 2021
2 parents 567320d + 9eb3000 commit 5a6b0e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
* [ENHANCEMENT] Add recording rules to improve responsiveness of Alertmanager dashboard. #387
* [ENHANCEMENT] Add `CortexRolloutStuck` alert. #405
* [ENHANCEMENT] Added `CortexKVStoreFailure` alert. #406
* [ENHANCEMENT] Add ability to override `datasource` for generated dashboards. #407
* [BUGFIX] Fixed `CortexIngesterHasNotShippedBlocks` alert false positive in case an ingester instance had ingested samples in the past, then no traffic was received for a long period and then it started receiving samples again. #308
* [BUGFIX] Alertmanager: fixed `--alertmanager.cluster.peers` CLI flag passed to alertmanager when HA is enabled. #329
* [BUGFIX] Fixed `CortexInconsistentRuntimeConfig` metric. #335
Expand Down
3 changes: 3 additions & 0 deletions cortex-mixin/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,8 @@

// The routes to exclude from alerts.
alert_excluded_routes: [],

// Name of the datasource for which the dashboards should attach to
dashboard_datasource: 'default',
},
}
2 changes: 1 addition & 1 deletion cortex-mixin/dashboards/dashboard-utils.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
// - default tags,
// - some links that propagate the selectred cluster.
dashboard(title)::
super.dashboard(title) + {
super.dashboard(title=title, datasource=$._config.dashboard_datasource) + {
addRowIf(condition, row)::
if condition
then self.addRow(row)
Expand Down

0 comments on commit 5a6b0e8

Please sign in to comment.