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
adding support to filter /api/v1/rules response #5749
Conversation
Hey @victoramsantos , thanks for the PR!
Yes, they should behave the same.
And I think we can add this filter parameter in VictoriaMetrics/app/vmalert/web.go Line 210 in de9a954
|
Hi @Haleygo job done! |
Yes, I like it :) |
Looks good to me! |
@Haleygo I think I did it right 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks!
Co-authored-by: Hui Wang <haley@victoriametrics.com>
Nice! @Haleygo I need to do something else or just wait for the merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Please also see #5787 |
FYI, this pull request has been included in vmalert v1.98.0. |
Is your feature request related to a problem? Please describe
By the Prometheus doc we have the possibility to filter the rules by alert or record rules (using the
type
param). On the vm-alert doc it's just saying that this api list of all loaded groups and rules . When I run with the type it returns the same info for both param value.Describe the solution you'd like
I would like that this API have the same behavior as in Prometheus, if I pass the parameter
?type=alert
it would return only the alerts, if I pass?type=record
only the record rules and if it's withouttype
both data.Describe alternatives you've considered
No response
Additional information
vmalert/api/v1/rules
endpoint, since I don't know if it's desired to it be equal toapi/v1/rules
. Feedbacks here please 😊Related feature-request: #5743