Add filtering by health and state in list rules
What this PR does:
This PR adds two additional filtering fields to the list rules API. If users want to list rules that are in firing state or healthy, they will be able to do it using the following parameters.
-
api/v1/ruleinfos?state=firing -
api/v1/ruleinfos?health=ok
Checklist
- [X] Tests updated
- [ ] Documentation added
- [ ]
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]
@euniceek Can you please update the PR description? I don't think Cortex supports ruleinfo API
@euniceek Can you please update the PR description? I don't think Cortex supports ruleinfo API
Thanks for the review! Updated!
Let's wait for another approval from a maintainer before merging this.
@euniceek Can you also update the changelog? We can call it an enhancement
ok.. LGTM!