Skip to content

Support Mimir's Prometheus API #755

@applejag

Description

@applejag

Grafana Mimir has an API that mimics Prometheus so you can do remote_read and remote_write to it.

But it doesn't support some of the endpoints that pint makes use of:

$ pint lint rules/*.yml
level=info msg="Loading configuration file" path=.pint.hcl
level=error msg="Query returned an error" error="client error: 404" query=/api/v1/status/flags uri=https://mimir.redacted.com/prometheus
level=error msg="Query returned an error" error="client error: 404" query=/api/v1/status/config uri=https://mimir.redacted.com/prometheus

Our current workaround is to just host a Prometheus that has remote_read configured, and then point pint towards this "proxy Prometheus". However we then have to silence check like the promql/range_query check, as the "proxy Prometheus"'s config does not represent our Mimir's retention and such.

Would be nice to be able to configure the Prometheus config in .pint.hcl that this is a Mimir, so it stops checking the config and flags endpoints.

And then either pint gets the retention from the Mimir API, or maybe just be able to hardcode the retention in the .pint.hcl?

Practically though, if someone is using Mimir, they're probably aiming to store a lot of long-term metrics, so the promql/range_query is pretty safe to just silence, as you realistically won't have alerts that spans like half a year.

Either way, just being able to skip this "proxy Prometheus" would be great

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions