cortexproject / cortex

A horizontally scalable, highly available, multi-tenant, long term Prometheus.
https://cortexmetrics.io/
Apache License 2.0
5.41k stars 787 forks source link

List rules API not honoring exclude_alerts flag #5989

Open sirianni opened 1 month ago

sirianni commented 1 month ago

Describe the bug I am consuming the Cortex API implicitly via Amazon Managed Prometheus (AMP).

When I hit /api/v1/rules?exclude_alerts=true I still get the list of active alerts[] array in the response.

According to the prometheus docs, the exclude_alerts should omit this element.

Environment: Amazon Managed Prometheus

yeya24 commented 1 month ago

Hi @rajagopalanand @rapphil, can you help take a look?

rajagopalanand commented 1 month ago

This is a bug in Cortex that needs to get fixed

rapphil commented 1 month ago

@yeya24 can you assign this issue to me?