-
Notifications
You must be signed in to change notification settings - Fork 4.1k
feat: mixin, allow overriding of some labels by parameterizing mixin recording/alert rules #11495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
638a1ea
7d1297a
d24862d
943abab
a7b55bd
8a23765
696f716
2e43670
3aacecc
77a6f15
ea13e6f
7754cf3
7ebdd9d
3a61421
105ec09
6571838
de90f70
8e183e7
88e5d73
ed0c9d8
fdfa18c
9b3c5df
859636f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| { | ||
| local makePrefix(groups) = std.join('_', groups), | ||
| local makeGroupBy(groups) = std.join(', ', groups), | ||
|
|
||
| _config+:: { | ||
| // Tags for dashboards. | ||
| tags: ['loki'], | ||
|
|
@@ -11,6 +14,20 @@ | |
|
|
||
| // The label used to differentiate between different clusters. | ||
| per_cluster_label: 'cluster', | ||
| per_namespace_label: 'namespace', | ||
| per_job_label: 'job', | ||
|
|
||
| // Grouping labels, to uniquely identify and group by {jobs, clusters} | ||
| job_labels: [$._config.per_cluster_label, $._config.per_namespace_label, $._config.per_job_label], | ||
| cluster_labels: [$._config.per_cluster_label, $._config.per_namespace_label], | ||
|
Comment on lines
+21
to
+22
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we make these names more explicit? even if it's long, I'd prefer to know all labels that are present from the name OR have to use each
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can change it, but would it not be better if it matches what mimir-mixin does, så that it easier for one who has used mimir-mixin to also use loki-mixin? |
||
|
|
||
| // Each group prefix is composed of `_`-separated labels | ||
| group_prefix_jobs: makePrefix($._config.job_labels), | ||
| group_prefix_clusters: makePrefix($._config.cluster_labels), | ||
|
|
||
| // Each group-by label list is `, `-separated and unique identifies | ||
| group_by_job: makeGroupBy($._config.job_labels), | ||
| group_by_cluster: makeGroupBy($._config.cluster_labels), | ||
|
alex5517 marked this conversation as resolved.
|
||
|
|
||
| // Enable dashboard and panels for Grafana Labs internal components. | ||
| internal_components: false, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.