Skip to content

Consider supporting 3rd party Prometheus HTTP API implementations via flag (ex: --backend=thanos) #4

@tjhop

Description

@tjhop

About

Prometheus is often a component within a larger collection of systems to store/manage/query metrics. As such, some 3rd party systems implement at least part of the Prometheus HTTP API. This is especially true for API endpoints like: query, range query, exemplar query, label names, label values, series, metric metadata, etc so that these 3rd party systems can serve as a "drop in" replacement for use with querying metrics in systems like grafana/perses.

Proposal

Add a flag --backend=$system that can potentially filter/tailor the list of tools available to the user based on the backend tool. This flag can be used to filter/change the tools that are exposed to the user based on the backend system being used.

Examples

Thanos Query

The querier implements the Prometheus HTTP v1 API according to the docs, but in practice it's not a 100% implementation:

  • Thanos primarily uses flags rather than a main config file, so the config api endpoint isn't implemented
  • Thanos has the stores endpoint that lists all valid store API servers, which is an additional API endpoint

These examples were off the top of my head; there may be other differences between Thanos/Prometheus APIs.

Grafana Mimir

Mimir has a much larger API footprint, including allowing for things like creating/updating/deleting rules via the API. This would be a significant number of new tools to add, if full support is the goal.

Cortex

Similar to Mimir, Cortex has a large API footprint and allows for lots of extra functionality. This would be a significant number of new tools to add, but at least they're pretty much the same between cortex and mimir.

VictoriaMetrics

VictoriaMetrics already has an existing VM community MCP server, so it would seem unnecessary to support VM here.

Others

There are also obviously tons of other services that expose a "Prometheus compatible API", but it's not feasible to support them all. In my experience, talking about Prometheus API support primarily centers around query and metadata/discovery endpoint support, so even without backend-specific support, the MCP server is already capable of supporting the vast majority of Prometheus API compatible tools/integrations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions