mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-26 04:57:36 +03:00
By default, `vmagent` doesn't parse [metadata](https://github.com/prometheus/docs/blob/main/docs/instrumenting/exposition_formats.md) when scraping targets, and drops metadata that received via [Prometheus remote write v1(https://prometheus.io/docs/specs/prw/remote_write_spec/) or [OpenTelemetryprotocol](https://github.com/open-telemetry/opentelemetryproto/blob/v1.7.0/opentelemetry/proto/metrics/v1/metrics.proto). To enable parsing metadata when scraping and sending metadata to the configured `-remoteWrite.url`, set `-enableMetadata=true`. Besides native metadata fields, vmagent also adds tenant info to metadata when `-enableMultitenantHandlers` is enabled and data is sent via the multitenant endpoints (/insert/<accountID>/<suffix>), allowing storing metadata under different tenants in VictoriaMetrics cluster. However, if `vm_account_id` or `vm_project_id labels` are added directly in metrics labels and send to the [vminsert multitenantendpoints](https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/#multitenancy-via-labels), tenant info won't be attached in the metadata, and it will be stored in the default tenant of VictoriaMetrics cluster. part of https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2974
vminsert routes the ingested data to vmstorage.