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

Refactor alert filtering #9

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Refactor alert filtering #9

wants to merge 1 commit into from

Conversation

simu
Copy link
Member

@simu simu commented Oct 5, 2020

Allows filtering on arbitrary metric labels, programmatically constructs the filter based on entries in alert_rule_filters.

Format:

  • Key in alert_rule_filters indicates label on which to filter.
  • Each entry in alert_rule filters expects another dict as value
  • Entry dicts support keys match, match_re, exclude and exclude_re which are mapped to=, =~, != and !~ respectively.
  • Values for the operation keys are reproduced verbatim wrapped in double quotes.

PoC / WIP implementation for #7

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Update the documentation.
  • Update the ./CHANGELOG.md.
  • Link this PR to related issues.

Allows filtering on arbitrary metric labels, programmatically constructs
the filter based on entries in alert_rule_filters.

Format:
* key in alert_rule_filters indicates label on which to filter.
* each entry in alert_rule filters expects another dict as value
* Entry dicts support keys `match`, `match_re`, `exclude` and
  `exclude_re` which are mapped to '=', '=~', '!=' and '!~' respectively.
* Values for the operation keys are reproduced verbatim wrapped in
  double quotes.
@simu simu changed the title New more generic alert filtering Refactor alert filtering Oct 5, 2020
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

Successfully merging this pull request may close these issues.

1 participant