Is your feature request related to a problem? Please describe.
This feature request is to support the Prometheus Metric Metadata API at /api/v1/metadata
in Prometheus v2.15.0+. Similar to #643, but this endpoint returns metadata about scraped metrics without any associated target information.
vmselect
currently returns an empty placeholder response for this endpoint (see e6bf88a).
More generally, the request is for VictoriaMetrics to support metric metadata throughout its Prometheus-compatible components. In addition to implementing /api/v1/metadata
, metadata would need to be scraped from Prometheus targets and also propagated via Prometheus remote-write, using the metadata
field added to the Prometheus remote-write protocol in v2.23.0.
Describe the solution you'd like
A full solution for Prometheus metadata would require updates to a few components:
vmselect
implements the /api/v1/metadata
endpoint with a response containing at least one metadata object per metric name.vmstorage
adds support for storing metric metadata.
_prometheus_metadata
) with metadata stored in metric
, type
, help
, unit
labels, requiring no change to vmstorage
itself.vmagent
scrapes metadata from Prometheus targets, and add the metadata
field to remote_write
requests it sends.vmagent
and vminsert
extract the metadata
field from remote_write
requests they receive.Describe alternatives you've considered
Since Victoriametrics currently ignores Prometheus metric metadata, the only alternative would be to proxy this endpoint to another handler which serves metric metadata stored in another system.
Additional context
Since the introduction of the Metric Metadata API, metric metadata has become an increasingly critical part of the Prometheus user experience.
One key use-case related to this feature request is to support Grafana's in-line metrics help text when using VictoriaMetrics as a Prometheus datasource:
dddeeemmm, 7840vz, kdask, wbh1, dfredell and 12 morearctan90 and ns-rorsten
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4