cloudflare / cloudflare/pint

Allow regex to keep for promql/aggregate

Open
#509 2 comments 1 reaction 1 assignee Claimed by @prymitive View on GitHub
Dominant language
Go
Stars
1k
Forks
70
Avg merge
1d 12h
Merged PRs (30d)
25

Description

Hey! Can you please allow regex to be used for "keep"? My prometheus uses a webhook to send alerts to corporate monitoring, it expects to receive alerts with at least one label from the set.

For example:
```
rule {
match {
kind = "alerting"
}

aggregate ".+" {
keep = ["lable1|lable2"]
}
}
```

more information:

Is there a way to check label by regex in the resulting vector, like promql/series (api request)? (after aggregating and adding additional labels)

I whant find alerts WITHOUT special_label
```
#situation 1:

- name: ""
rules:
- alert: AlertName
expr:
labels:
special_label: ...

#situation 2:

- name: ""
rules:
- alert: AlertName
expr: sum by (special_label)...
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.