From 65d9e281d6294c571e8eb282ed1d826b43453a5c Mon Sep 17 00:00:00 2001 From: Dmytro Kozlov Date: Mon, 27 Feb 2023 15:28:47 +0200 Subject: [PATCH] app/vmctl: skip series if measurement not found (#3869) app/vmctl: skip measurements with no fields for influxdb mode --- app/vmctl/influx/influx.go | 3 ++- docs/CHANGELOG.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/vmctl/influx/influx.go b/app/vmctl/influx/influx.go index 8c77fed49b..ab25bcb3fe 100644 --- a/app/vmctl/influx/influx.go +++ b/app/vmctl/influx/influx.go @@ -162,7 +162,8 @@ func (c *Client) Explore() ([]*Series, error) { for _, s := range series { fields, ok := mFields[s.Measurement] if !ok { - return nil, fmt.Errorf("can't find field keys for measurement %q", s.Measurement) + log.Printf("skip measurement %q since it has no fields", s.Measurement) + continue } for _, field := range fields { is := &Series{ diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index feb35595a7..a67a22940b 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -16,6 +16,7 @@ The following tip changes can be tested by building VictoriaMetrics components f ## tip * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): use the provided `-remoteWrite.*` auth options when determining whether the remote storage supports [VictoriaMetrics remote write protocol](https://docs.victoriametrics.com/vmagent.html#victoriametrics-remote-write-protocol). Previously the auth options were ignored. This was preventing from automatic switch to VictoriaMetrics remote write protocol. +* BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl.html): skip measurements with no fields when migrating data from influxdb. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3837). ## [v1.88.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.88.0)