diff --git a/app/vmctl/vm_native.go b/app/vmctl/vm_native.go index 618e1fdec..121a8bfa1 100644 --- a/app/vmctl/vm_native.go +++ b/app/vmctl/vm_native.go @@ -120,7 +120,7 @@ func (p *vmNativeProcessor) runSingle(ctx context.Context, f native.Filter, srcU if p.disablePerMetricRequests { pr := bar.NewProxyReader(reader) if pr != nil { - reader = bar.NewProxyReader(reader) + reader = pr fmt.Printf("Continue import process with filter %s:\n", f.String()) } } @@ -193,7 +193,15 @@ func (p *vmNativeProcessor) runBackfilling(ctx context.Context, tenantID string, var metrics = map[string][][]time.Time{ "": ranges, } + + format := nativeSingleProcessTpl + barPrefix := "Requests to make" + if p.interCluster { + barPrefix = fmt.Sprintf("Requests to make for tenant %s", tenantID) + } + if !p.disablePerMetricRequests { + format = fmt.Sprintf(nativeWithBackoffTpl, barPrefix) metrics, err = p.explore(ctx, p.src, tenantID, ranges) if err != nil { return fmt.Errorf("failed to explore metric names: %s", err) @@ -223,15 +231,7 @@ func (p *vmNativeProcessor) runBackfilling(ctx context.Context, tenantID string, log.Print(foundSeriesMsg) } - barPrefix := "Requests to make" - if p.interCluster { - barPrefix = fmt.Sprintf("Requests to make for tenant %s", tenantID) - } - - bar := barpool.NewSingleProgress(fmt.Sprintf(nativeWithBackoffTpl, barPrefix), requestsToMake) - if p.disablePerMetricRequests { - bar = barpool.NewSingleProgress(nativeSingleProcessTpl, 0) - } + bar := barpool.NewSingleProgress(format, requestsToMake) bar.Start() defer bar.Finish() @@ -362,16 +362,17 @@ func byteCountSI(b int64) string { } func buildMatchWithFilter(filter string, metricName string) (string, error) { - if filter == metricName { - return filter, nil - } - nameFilter := fmt.Sprintf("__name__=%q", metricName) - tfss, err := searchutils.ParseMetricSelector(filter) if err != nil { return "", err } + if filter == metricName || metricName == "" { + return filter, nil + } + + nameFilter := fmt.Sprintf("__name__=%q", metricName) + var filters []string for _, tfs := range tfss { var a []string diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index b5e0fb0c1..3d84ad75d 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -17,9 +17,11 @@ The sandbox cluster installation runs under the constant load generated by See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). ## tip + * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): `-rule` cmd-line flag now supports multi-document YAML files. This could be useful when rules are retrieved via HTTP URL where multiple rule files were merged together in one response. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6753). Thanks to @Irene-123 for [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6995). * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. +* BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl/): fix issue with series matching for `vmctl vm-native` with `--vm-native-disable-per-metric-migration` flag enabled. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7309). ## [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0)