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

Allow regex to keep for promql/aggregate #509

Open
leagueofsoups opened this issue Jan 25, 2023 · 0 comments
Open

Allow regex to keep for promql/aggregate #509

leagueofsoups opened this issue Jan 25, 2023 · 0 comments
Assignees

Comments

@leagueofsoups
Copy link

leagueofsoups commented Jan 25, 2023

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: "<name>"
  rules:
  - alert: AlertName
    expr: <aggregate expression>
    labels:
      special_label: ...

#situation 2:

- name: "<name>"
  rules:
  - alert: AlertName
    expr: sum by (special_label)...
@prymitive prymitive self-assigned this Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants