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

feat: implement mapping priority #905

Closed
pehlicd opened this issue Mar 6, 2024 · 5 comments · Fixed by #908
Closed

feat: implement mapping priority #905

pehlicd opened this issue Mar 6, 2024 · 5 comments · Fixed by #908
Labels
API API related issues Enhancement New feature or request

Comments

@pehlicd
Copy link
Contributor

pehlicd commented Mar 6, 2024

Hey,

For our use case we need priority in mappings. For example:

priority mapping description
0 general_rules.csv enrich alerts using specific labels and add environment labels
1 env_specific_rules.csv enrich alerts using environment labels and add more identifiers
2 alert_specific_rules.csv do the rest of rulings

I also saw that when a new mapping is created api responses with priority. A simple csv example would be like:

Priority 0

matchers are = source, cluster

source cluster environment
prometheus dev-k8s-1 sandbox
prometheus prod-k8s-1 prod
sentry dev-sentry sandbox
sentry prod-sentry prod

Priority 1

matchers are = environment, service

environment service owner
sandbox dev-frontend frontend-team
sandbox cart-service backend-team
sandbox kube-prometheus (empty because we dont care alerts coming from this service)
prod * (match every service) all
prod service-1 (for this service override the owner=all) devops
@talboren talboren added Enhancement New feature or request API API related issues labels Mar 6, 2024
@talboren talboren closed this as completed Mar 6, 2024
@talboren
Copy link
Member

talboren commented Mar 6, 2024

Closed by mistake

@talboren talboren reopened this Mar 6, 2024
@talboren talboren linked a pull request Mar 6, 2024 that will close this issue
@talboren
Copy link
Member

talboren commented Mar 6, 2024

@pehlicd any chance you can checkout #908 to see if it answers your requirements? :)

@pehlicd
Copy link
Contributor Author

pehlicd commented Mar 6, 2024

Thanks for rapid support on the issue Tal :). Gonna check it out, one thought that came to my mind, adding regex support would be hard to implement?

@talboren
Copy link
Member

talboren commented Mar 6, 2024

Thanks for rapid support on the issue Tal :). Gonna check it out, one thought that came to my mind, adding regex support would be hard to implement?

Not at all. I’ll try to iterate it soon. Let me know if this works as a starter :)

@pehlicd
Copy link
Contributor Author

pehlicd commented Mar 6, 2024

As starter it seems perfect 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API related issues Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants