Skip to content

Spec drift: update for elasticsearch#150235 (new GET /_prometheus/api/v1/status/buildinfo endpoint) #6337

Description

@github-actions

Elasticsearch PR

API Impact

This PR adds a new endpoint to the Prometheus HTTP API compatibility layer:

Method URL Description
GET /_prometheus/api/v1/status/buildinfo Returns Elasticsearch build info in Prometheus buildinfo format
GET /_prometheus/{index}/api/v1/status/buildinfo Same, scoped to an optional index pattern

Grafana queries this endpoint when connecting to any Prometheus-compatible datasource. Without it, (1) the "Plugin info" panel in Grafana Metrics Drilldown shows a hard error, and (2) Grafana's alerting feature discovery receives an error response instead of a graceful 404, which can disrupt alerting rule configuration flows.

Route annotation: @ServerlessScope(Scope.PUBLIC) — available in both stateful and serverless.

Path parameter

Name Type Required Description
index string No Optional index pattern scope; defaults to metrics-*:prometheus.* if omitted

Response body (JSON)

{
  "status": "success",
  "data": {
    "application": "Elasticsearch",
    "version": "<build version>",
    "revision": "<git hash>",
    "buildDate": "<build date>"
  }
}

Relation to existing spec work

Spec PR #6293 (currently open) adds a prometheus/ namespace with five endpoints from the ES 9.4.0 release (prometheus.query, prometheus.query_range, prometheus.series, prometheus.labels, prometheus.remote_write). That PR does not include the buildinfo endpoint, which was introduced later in 9.5.0.

This issue tracks the sixth Prometheus endpoint. It can either be folded into PR #6293 before it merges, or implemented as a follow-up.

Specification files likely to need changes

Following the conventions in PR #6293:

  • New: specification/prometheus/status_buildinfo/PrometheusStatusBuildInfoRequest.ts
  • New: specification/prometheus/status_buildinfo/PrometheusStatusBuildInfoResponse.ts

The response type can be modelled as a concrete typed object (unlike the other five Prometheus endpoints which use UserDefinedValue), since its shape is simple and fully known:

class PrometheusStatusBuildInfoResponse {
  status: string
  data: PrometheusStatusBuildInfoData
}

class PrometheusStatusBuildInfoData {
  application: string
  version: string
  revision: string
  buildDate: string
}

Stability and visibility should mirror the other Prometheus endpoints (Tech Preview: stability=experimental, visibility=public).

Notes for triagers

  • Consider assigning @felixbarny (the original Elasticsearch PR author) as this is a straightforward new endpoint.
  • This can be folded into the existing open PR Add Prometheus namespace with five new endpoints #6293 if that PR has not yet been merged, or filed as a new standalone spec PR.
  • The index path parameter consumes but does not use the value in the response (the response is always the same static build info regardless of index scope).

Generated by Weekly Elasticsearch Specification Drift · ● 3.3M · ◷

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions