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: map ems severity to prom sev #1973

Merged
merged 2 commits into from
Apr 21, 2023
Merged

Conversation

7840vz
Copy link
Contributor

@7840vz 7840vz commented Apr 20, 2023

Instead of using static 'critical', use label 'severity' coming from EMS and maps to recommended prometheus scale of info/warning/critical: https://monitoring.mixins.dev/#guidelines-for-alert-names-labels-and-annotations
Known severity from ems: emergency, alert, error, informational, and notice
Severities suggested for use in alertmanager/prom: critical/warning/info.

Uses label 'severity' coming from EMS and maps to recommended prometheus scale of info/warning/critical: https://monitoring.mixins.dev/#guidelines-for-alert-names-labels-and-annotations
@cgrinds
Copy link
Collaborator

cgrinds commented Apr 20, 2023

Thanks @7840vz!

promtool check rules passes

Do you know if Prom alerts.yaml supports anchors/aliases to help reduce duplication? I haven't tried, but thought you might know. I know support for anchors/aliases varies a lot by tool and it may not be worth it to reduce this duplication.

@7840vz
Copy link
Contributor Author

7840vz commented Apr 20, 2023

hi! Regarding, anchors, unsure if it would work: prometheus/prometheus#6266

Turning your dashboard and alerts into monitoring-mixin might help though:
https://monitoring.mixins.dev/

some examples:
Kube: https://github.com/kubernetes-monitoring/kubernetes-mixin
Node: https://github.com/prometheus/node_exporter/tree/master/docs/node-mixin

Here , alerts can be redefined in jsonnet format and actual yamls can regenerated from Makefile or other tooling.

@cgrinds
Copy link
Collaborator

cgrinds commented Apr 20, 2023

Thanks. Yes, we've discussed jsonnet in the past, but only for dashboards, where there were some bigger trade-offs. For alerts, jsonnet may be a better fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Harvest EMS Prometheus alerts should use info, warning, and critical severities
2 participants