Skip to content
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

Add filtering by namespace in non-tempo alerts #1098

Merged
merged 3 commits into from
Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## main / unreleased

* [ENHANCEMENT] Expose `upto` parameter on hedged requests for each backend with `hedge_requests_up_to`. [#1085](https:/grafana/tempo/pull/1085) (@joe-elliott)
* [ENHANCEMENT] Jsonnet: add `$._config.namespace` to filter by namespace in cortex metrics [#1098](https:/grafana/tempo/pull/1098) (@mapno)

## v1.2.0 / 2021-11-05
* [CHANGE] **BREAKING CHANGE** Drop support for v0 and v1 blocks. See [1.1 changelog](https:/grafana/tempo/releases/tag/v1.1.0) for details [#919](https:/grafana/tempo/pull/919) (@joe-elliott)
Expand Down
8 changes: 4 additions & 4 deletions operations/tempo-mixin/alerts.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
{
alert: 'TempoCompactorUnhealthy',
expr: |||
max by (%s) (cortex_ring_members{state="Unhealthy", name="%s"}) > 0
||| % [$._config.group_by_cluster, $._config.jobs.compactor],
max by (%s) (cortex_ring_members{state="Unhealthy", name="%s", namespace=~"%s"}) > 0
||| % [$._config.group_by_cluster, $._config.jobs.compactor, $._config.namespace],
'for': '15m',
labels: {
severity: 'critical',
Expand All @@ -57,8 +57,8 @@
alert: 'TempoDistributorUnhealthy',
'for': '15m',
expr: |||
max by (%s) (cortex_ring_members{state="Unhealthy", name="%s"}) > 0
||| % [$._config.group_by_cluster, $._config.jobs.distributor],
max by (%s) (cortex_ring_members{state="Unhealthy", name="%s", namespace=~"%s"}) > 0
||| % [$._config.group_by_cluster, $._config.jobs.distributor, $._config.namespace],
labels: {
severity: 'warning',
},
Expand Down
1 change: 1 addition & 0 deletions operations/tempo-mixin/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

_config+:: {
http_api_prefix: '',
namespace: '.*',
jobs: {
gateway: 'cortex-gw',
query_frontend: 'query-frontend',
Expand Down
4 changes: 2 additions & 2 deletions operations/tempo-mixin/yamls/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"message": "There are {{ printf \"%f\" $value }} unhealthy compactor(s)."
"runbook_url": "https:/grafana/tempo/tree/main/operations/tempo-mixin/runbook.md#TempoCompactorUnhealthy"
"expr": |
max by (cluster, namespace) (cortex_ring_members{state="Unhealthy", name="compactor"}) > 0
max by (cluster, namespace) (cortex_ring_members{state="Unhealthy", name="compactor", namespace=~".*"}) > 0
"for": "15m"
"labels":
"severity": "critical"
Expand All @@ -38,7 +38,7 @@
"message": "There are {{ printf \"%f\" $value }} unhealthy distributor(s)."
"runbook_url": "https:/grafana/tempo/tree/main/operations/tempo-mixin/runbook.md#TempoDistributorUnhealthy"
"expr": |
max by (cluster, namespace) (cortex_ring_members{state="Unhealthy", name="distributor"}) > 0
max by (cluster, namespace) (cortex_ring_members{state="Unhealthy", name="distributor", namespace=~".*"}) > 0
"for": "15m"
"labels":
"severity": "warning"
Expand Down