⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@martialblog
Copy link
Member

Fixes #113

See #111

@martialblog
Copy link
Member Author

@gianmarco-mameli @mattttv

This PR introduces --include-label and --exclude-label flags for alerts. Feel free to test this and give feedback.

@gianmarco-mameli
Copy link
Contributor

Hi @martialblog thank you, I'll give a try and I get back to you with some results

@mattttv
Copy link

mattttv commented Jan 30, 2026

hello @martialblog. thanks for your efforts - awesome!
I tested this in a cluster 4.19.10 without any user prometheus (because the filter in openshift metrics is somewhat limited and gives wrong amounts of checks because it mixes user with core)
i checked with one --include-label severity=MYSEVERITYwhere severity was critical,info,warning,none and everything worked great! nice!
then I combined two params --include-label severity=none --include-label severity=info and it looks like only the last parameter is used - so there is a problem with the logic

check_prometheus alert --include-label severity=none
yields 1 alert
check_prometheus alert --include-label severity=info
yields 23 alerts
check_prometheus alert --include-label severity=none --include-label severity=info
yields 23 alerts
check_prometheus alert --include-label severity=info --include-label severity=none
yields 1 alerts

single exclude-label also seem to work but multiple params seem only to take the first one into account (so the other way round than with include).

Cheers,
Matt

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.

[Feature]: Filter alerts by label

4 participants