mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmctl: follow-up after 0c293a66ec
Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
parent
0c293a66ec
commit
f973711e56
6 changed files with 19 additions and 22 deletions
|
@ -277,28 +277,28 @@ var (
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: influxPrometheusMode,
|
Name: influxPrometheusMode,
|
||||||
Usage: "Wether to restore the original timeseries name previously written from Prometheus to InfluxDB v1 via remote_write.",
|
Usage: "Whether to restore the original timeseries name previously written from Prometheus to InfluxDB v1 via remote_write.",
|
||||||
Value: false,
|
Value: false,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: influxCertFile,
|
Name: influxCertFile,
|
||||||
Usage: "Optional path to client-side TLS certificate file to use when connecting to influxAddr",
|
Usage: "Optional path to client-side TLS certificate file to use when connecting to -influx-addr",
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: influxKeyFile,
|
Name: influxKeyFile,
|
||||||
Usage: "Optional path to client-side TLS key to use when connecting to influxAddr",
|
Usage: "Optional path to client-side TLS key to use when connecting to -influx-addr",
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: influxCAFile,
|
Name: influxCAFile,
|
||||||
Usage: "Optional path to TLS CA file to use for verifying connections to influxAddr. By default, system CA is used",
|
Usage: "Optional path to TLS CA file to use for verifying connections to -influx-addr. By default, system CA is used",
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: influxServerName,
|
Name: influxServerName,
|
||||||
Usage: "Optional TLS server name to use for connections to influxAddr. By default, the server name from influxAddr is used",
|
Usage: "Optional TLS server name to use for connections to -influx-addr. By default, the server name from -influx-addr is used",
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: influxInsecureSkipVerify,
|
Name: influxInsecureSkipVerify,
|
||||||
Usage: "Whether to skip tls verification when connecting to infuxAddr",
|
Usage: "Whether to skip tls verification when connecting to -influx-addr",
|
||||||
Value: false,
|
Value: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -606,19 +606,19 @@ var (
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: remoteReadCertFile,
|
Name: remoteReadCertFile,
|
||||||
Usage: "Optional path to client-side TLS certificate file to use when connecting to remoteReadSrcAddr",
|
Usage: "Optional path to client-side TLS certificate file to use when connecting to -remote-read-src-addr",
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: remoteReadKeyFile,
|
Name: remoteReadKeyFile,
|
||||||
Usage: "Optional path to client-side TLS key to use when connecting to remoteReadSrcAddr",
|
Usage: "Optional path to client-side TLS key to use when connecting to -remote-read-src-addr",
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: remoteReadCAFile,
|
Name: remoteReadCAFile,
|
||||||
Usage: "Optional path to TLS CA file to use for verifying connections to remoteReadSrcAddr. By default, system CA is used",
|
Usage: "Optional path to TLS CA file to use for verifying connections to -remote-read-src-addr. By default, system CA is used",
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: remoteReadServerName,
|
Name: remoteReadServerName,
|
||||||
Usage: "Optional TLS server name to use for connections to remoteReadSrcAddr. By default, the server name from remoteReadSrcAddr is used",
|
Usage: "Optional TLS server name to use for connections to remoteReadSrcAddr. By default, the server name from -remote-read-src-addr is used",
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: remoteReadInsecureSkipVerify,
|
Name: remoteReadInsecureSkipVerify,
|
||||||
|
|
|
@ -65,7 +65,7 @@ type Config struct {
|
||||||
// Is optional.
|
// Is optional.
|
||||||
LabelName, LabelValue string
|
LabelName, LabelValue string
|
||||||
|
|
||||||
// Optional cert file, key file, CA file and server name for client side TLS condiguration
|
// Optional cert file, key file, CA file and server name for client side TLS configuration
|
||||||
CertFile string
|
CertFile string
|
||||||
KeyFile string
|
KeyFile string
|
||||||
CAFile string
|
CAFile string
|
||||||
|
@ -110,10 +110,9 @@ func NewClient(cfg Config) (*Client, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//create Transport
|
|
||||||
tr, err := httputils.Transport(cfg.Addr, cfg.CertFile, cfg.KeyFile, cfg.CAFile, cfg.ServerName, cfg.InsecureSkipVerify)
|
tr, err := httputils.Transport(cfg.Addr, cfg.CertFile, cfg.KeyFile, cfg.CAFile, cfg.ServerName, cfg.InsecureSkipVerify)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, fmt.Errorf("failed to create transport: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
c := &Client{
|
c := &Client{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package utils
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
@ -13,8 +13,7 @@ const (
|
||||||
maxTimeMsecs = int64(1<<63-1) / 1e6
|
maxTimeMsecs = int64(1<<63-1) / 1e6
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetTime returns time from the given string.
|
func parseTime(s string) (time.Time, error) {
|
||||||
func GetTime(s string) (time.Time, error) {
|
|
||||||
secs, err := promutils.ParseTime(s)
|
secs, err := promutils.ParseTime(s)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return time.Time{}, fmt.Errorf("cannot parse %s: %w", s, err)
|
return time.Time{}, fmt.Errorf("cannot parse %s: %w", s, err)
|
|
@ -1,4 +1,4 @@
|
||||||
package utils
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
@ -165,7 +165,7 @@ func TestGetTime(t *testing.T) {
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
got, err := GetTime(tt.s)
|
got, err := parseTime(tt.s)
|
||||||
if (err != nil) != tt.wantErr {
|
if (err != nil) != tt.wantErr {
|
||||||
t.Errorf("ParseTime() error = %v, wantErr %v", err, tt.wantErr)
|
t.Errorf("ParseTime() error = %v, wantErr %v", err, tt.wantErr)
|
||||||
return
|
return
|
|
@ -16,7 +16,6 @@ import (
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/limiter"
|
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/limiter"
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/native"
|
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/native"
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/stepper"
|
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/stepper"
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/utils"
|
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/vm"
|
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/vm"
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmselect/searchutils"
|
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmselect/searchutils"
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
|
||||||
|
@ -54,14 +53,14 @@ func (p *vmNativeProcessor) run(ctx context.Context) error {
|
||||||
startTime: time.Now(),
|
startTime: time.Now(),
|
||||||
}
|
}
|
||||||
|
|
||||||
start, err := utils.GetTime(p.filter.TimeStart)
|
start, err := parseTime(p.filter.TimeStart)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to parse %s, provided: %s, error: %w", vmNativeFilterTimeStart, p.filter.TimeStart, err)
|
return fmt.Errorf("failed to parse %s, provided: %s, error: %w", vmNativeFilterTimeStart, p.filter.TimeStart, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
end := time.Now().In(start.Location())
|
end := time.Now().In(start.Location())
|
||||||
if p.filter.TimeEnd != "" {
|
if p.filter.TimeEnd != "" {
|
||||||
end, err = utils.GetTime(p.filter.TimeEnd)
|
end, err = parseTime(p.filter.TimeEnd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to parse %s, provided: %s, error: %w", vmNativeFilterTimeEnd, p.filter.TimeEnd, err)
|
return fmt.Errorf("failed to parse %s, provided: %s, error: %w", vmNativeFilterTimeEnd, p.filter.TimeEnd, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ The sandbox cluster installation is running under the constant load generated by
|
||||||
|
|
||||||
* FEATURE: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): expose `vm_last_partition_parts` [metrics](https://docs.victoriametrics.com/#monitoring), which show the number of [parts in the latest partition](https://docs.victoriametrics.com/#storage). These metrics may help debugging query performance slowdown related to the increased number of parts in the last partition, since usually all the ingested data is written to the last partition and all the queries are performed over the recently ingested data, e.g. the last partition.
|
* FEATURE: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): expose `vm_last_partition_parts` [metrics](https://docs.victoriametrics.com/#monitoring), which show the number of [parts in the latest partition](https://docs.victoriametrics.com/#storage). These metrics may help debugging query performance slowdown related to the increased number of parts in the last partition, since usually all the ingested data is written to the last partition and all the queries are performed over the recently ingested data, e.g. the last partition.
|
||||||
* FEATURE: [vmctl](https://docs.victoriametrics.com/vmctl.html): support client-side TLS configuration for [InfluxDB](https://docs.victoriametrics.com/vmctl/#migrating-data-from-influxdb-1x). See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5748). Thanks to @khushijain21 [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5783).
|
* FEATURE: [vmctl](https://docs.victoriametrics.com/vmctl.html): support client-side TLS configuration for [InfluxDB](https://docs.victoriametrics.com/vmctl/#migrating-data-from-influxdb-1x). See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5748). Thanks to @khushijain21 [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5783).
|
||||||
|
* FEATURE: [vmctl](https://docs.victoriametrics.com/vmctl.html): support client-side TLS configuration for [Remote Read protocol](https://docs.victoriametrics.com/vmctl/#migrating-data-by-remote-read-protocol). See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5748). Thanks to @khushijain21 [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5798).
|
||||||
|
|
||||||
## [v1.98.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.98.0)
|
## [v1.98.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.98.0)
|
||||||
|
|
||||||
|
@ -68,7 +69,6 @@ Released at 2024-02-14
|
||||||
* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): clear entered text in select after selecting a value. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5727).
|
* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): clear entered text in select after selecting a value. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5727).
|
||||||
* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): improve the operation of the context for autocomplete. See [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5736), [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5737) and [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5739) issues.
|
* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): improve the operation of the context for autocomplete. See [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5736), [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5737) and [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5739) issues.
|
||||||
* BUGFIX: [dashboards](https://grafana.com/orgs/victoriametrics): update `Storage full ETA` panels for Single-node and Cluster dashboards to prevent them from showing negative or blank results caused by increase of deduplicated samples. Deduplicated samples were part of the expression to provide a better estimate for disk usage, but due to sporadic nature of [deduplication](https://docs.victoriametrics.com/#deduplication) in VictoriaMetrics it rather produced skewed results. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5747).
|
* BUGFIX: [dashboards](https://grafana.com/orgs/victoriametrics): update `Storage full ETA` panels for Single-node and Cluster dashboards to prevent them from showing negative or blank results caused by increase of deduplicated samples. Deduplicated samples were part of the expression to provide a better estimate for disk usage, but due to sporadic nature of [deduplication](https://docs.victoriametrics.com/#deduplication) in VictoriaMetrics it rather produced skewed results. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5747).
|
||||||
* FEATURE: [vmctl](https://docs.victoriametrics.com/vmctl.html): support client-side TLS configuration for migration from remote read address. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5748)
|
|
||||||
|
|
||||||
# [v1.97.2](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.97.2)
|
# [v1.97.2](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.97.2)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue