From fe68bb3ba79851c1a8bac0e792a3fbc88b753e0f Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 21 Jul 2022 19:58:22 +0300 Subject: [PATCH] all: follow-up after 46f803fa7aa8d790f0b9eec9eb4beb9c778c237d Add -pushmetrics.* command-line flags to all the VictoriaMetrics apps --- app/vmagent/README.md | 8 ++++++++ app/vmagent/main.go | 2 ++ app/vmalert/README.md | 8 ++++++++ app/vmalert/main.go | 2 ++ app/vmauth/README.md | 8 ++++++++ app/vmauth/main.go | 2 ++ app/vmbackup/README.md | 8 ++++++++ app/vmbackup/main.go | 2 ++ app/vmbackupmanager/README.md | 8 ++++++++ app/vmgateway/README.md | 8 ++++++++ app/vmrestore/README.md | 8 ++++++++ app/vmrestore/main.go | 2 ++ app/vmselect/main.go | 2 ++ app/vmstorage/main.go | 2 ++ docs/README.md | 22 ++++++++++++++++++++++ docs/Single-server-VictoriaMetrics.md | 14 +++++++++++--- docs/vmagent.md | 8 ++++++++ docs/vmalert.md | 8 ++++++++ docs/vmauth.md | 8 ++++++++ docs/vmbackup.md | 8 ++++++++ docs/vmbackupmanager.md | 8 ++++++++ docs/vmgateway.md | 8 ++++++++ docs/vmrestore.md | 8 ++++++++ 23 files changed, 159 insertions(+), 3 deletions(-) diff --git a/app/vmagent/README.md b/app/vmagent/README.md index 3467f673a2..2256f38a66 100644 --- a/app/vmagent/README.md +++ b/app/vmagent/README.md @@ -1079,6 +1079,14 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . Whether to suppress scrape errors logging. The last error for each target is always available at '/targets' page even if scrape errors logging is suppressed. See also -promscrape.suppressScrapeErrorsDelay -promscrape.suppressScrapeErrorsDelay duration The delay for suppressing repeated scrape errors logging per each scrape targets. This may be used for reducing the number of log lines related to scrape errors. See also -promscrape.suppressScrapeErrors + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -remoteWrite.aws.accessKey array Optional AWS AccessKey to use for the corresponding -remoteWrite.url if -remoteWrite.aws.useSigv4 is set Supports an array of values separated by comma or specified via multiple flags. diff --git a/app/vmagent/main.go b/app/vmagent/main.go index a7e2421730..d44d1b716a 100644 --- a/app/vmagent/main.go +++ b/app/vmagent/main.go @@ -37,6 +37,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/procutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape" "github.com/VictoriaMetrics/VictoriaMetrics/lib/protoparser/common" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/pushmetrics" "github.com/VictoriaMetrics/VictoriaMetrics/lib/writeconcurrencylimiter" "github.com/VictoriaMetrics/metrics" ) @@ -76,6 +77,7 @@ func main() { flag.CommandLine.SetOutput(os.Stdout) flag.Usage = usage envflag.Parse() + pushmetrics.Init() remotewrite.InitSecretFlags() buildinfo.Init() logger.Init() diff --git a/app/vmalert/README.md b/app/vmalert/README.md index 9172d877ef..6694f43d4f 100644 --- a/app/vmalert/README.md +++ b/app/vmalert/README.md @@ -787,6 +787,14 @@ The shortlist of configuration flags is the following: The maximum duration for waiting to perform API requests if more than -promscrape.discovery.concurrency requests are simultaneously performed (default 1m0s) -promscrape.dnsSDCheckInterval duration Interval for checking for changes in dns. This works only if dns_sd_configs is configured in '-promscrape.config' file. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config for details (default 30s) + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -remoteRead.basicAuth.password string Optional basic auth password for -remoteRead.url -remoteRead.basicAuth.passwordFile string diff --git a/app/vmalert/main.go b/app/vmalert/main.go index feef1691c0..35bbac02f6 100644 --- a/app/vmalert/main.go +++ b/app/vmalert/main.go @@ -23,6 +23,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/httpserver" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" "github.com/VictoriaMetrics/VictoriaMetrics/lib/procutil" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/pushmetrics" "github.com/VictoriaMetrics/metrics" ) @@ -79,6 +80,7 @@ func main() { flag.CommandLine.SetOutput(os.Stdout) flag.Usage = usage envflag.Parse() + pushmetrics.Init() buildinfo.Init() logger.Init() err := templates.Load(*ruleTemplatesPath, true) diff --git a/app/vmauth/README.md b/app/vmauth/README.md index 6ccc09d9fb..1f102bb8ff 100644 --- a/app/vmauth/README.md +++ b/app/vmauth/README.md @@ -288,6 +288,14 @@ See the docs at https://docs.victoriametrics.com/vmauth.html . Auth key for /metrics endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -reloadAuthKey string Auth key for /-/reload http endpoint. It must be passed as authKey=... -tls diff --git a/app/vmauth/main.go b/app/vmauth/main.go index 06af2528cc..684161800a 100644 --- a/app/vmauth/main.go +++ b/app/vmauth/main.go @@ -17,6 +17,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/httpserver" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" "github.com/VictoriaMetrics/VictoriaMetrics/lib/procutil" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/pushmetrics" "github.com/VictoriaMetrics/metrics" ) @@ -33,6 +34,7 @@ func main() { flag.CommandLine.SetOutput(os.Stdout) flag.Usage = usage envflag.Parse() + pushmetrics.Init() buildinfo.Init() logger.Init() logger.Infof("starting vmauth at %q...", *httpListenAddr) diff --git a/app/vmbackup/README.md b/app/vmbackup/README.md index 51fa65fa9e..41b5fb5b9b 100644 --- a/app/vmbackup/README.md +++ b/app/vmbackup/README.md @@ -239,6 +239,14 @@ See [this article](https://medium.com/@valyala/speeding-up-backups-for-big-time- Optional origin directory on the remote storage with old backup for server-side copying when performing full backup. This speeds up full backups -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -s3ForcePathStyle Prefixing endpoint with bucket name when set false, true by default. (default true) -snapshot.createURL string diff --git a/app/vmbackup/main.go b/app/vmbackup/main.go index d527157c69..7280b76a36 100644 --- a/app/vmbackup/main.go +++ b/app/vmbackup/main.go @@ -17,6 +17,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/flagutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/httpserver" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/pushmetrics" "github.com/VictoriaMetrics/VictoriaMetrics/lib/snapshot" ) @@ -41,6 +42,7 @@ func main() { flag.CommandLine.SetOutput(os.Stdout) flag.Usage = usage envflag.Parse() + pushmetrics.Init() buildinfo.Init() logger.Init() diff --git a/app/vmbackupmanager/README.md b/app/vmbackupmanager/README.md index 1b3f075d48..0645145fe5 100644 --- a/app/vmbackupmanager/README.md +++ b/app/vmbackupmanager/README.md @@ -238,6 +238,14 @@ vmbackupmanager performs regular backups according to the provided configs. Auth key for /metrics endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -runOnStart Upload backups immediately after start of the service. Otherwise the backup starts on new hour -s3ForcePathStyle diff --git a/app/vmgateway/README.md b/app/vmgateway/README.md index 52924d771b..2bebda6baa 100644 --- a/app/vmgateway/README.md +++ b/app/vmgateway/README.md @@ -281,6 +281,14 @@ The shortlist of configuration flags include the following: Auth key for /metrics endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -ratelimit.config string path for configuration file. Accepts url address -ratelimit.configCheckInterval duration diff --git a/app/vmrestore/README.md b/app/vmrestore/README.md index 73985e440b..1551d25495 100644 --- a/app/vmrestore/README.md +++ b/app/vmrestore/README.md @@ -141,6 +141,14 @@ i.e. the end result would be similar to [rsync --delete](https://askubuntu.com/q Auth key for /metrics endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -s3ForcePathStyle Prefixing endpoint with bucket name when set false, true by default. (default true) -skipBackupCompleteCheck diff --git a/app/vmrestore/main.go b/app/vmrestore/main.go index 1c74b3d89d..2952296485 100644 --- a/app/vmrestore/main.go +++ b/app/vmrestore/main.go @@ -14,6 +14,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/flagutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/httpserver" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/pushmetrics" ) var ( @@ -33,6 +34,7 @@ func main() { flag.CommandLine.SetOutput(os.Stdout) flag.Usage = usage envflag.Parse() + pushmetrics.Init() buildinfo.Init() logger.Init() diff --git a/app/vmselect/main.go b/app/vmselect/main.go index 7cd01ac727..d5b1558697 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -27,6 +27,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/httpserver" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" "github.com/VictoriaMetrics/VictoriaMetrics/lib/procutil" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/pushmetrics" "github.com/VictoriaMetrics/VictoriaMetrics/lib/querytracer" "github.com/VictoriaMetrics/VictoriaMetrics/lib/storage" "github.com/VictoriaMetrics/VictoriaMetrics/lib/tenantmetrics" @@ -74,6 +75,7 @@ func main() { flag.CommandLine.SetOutput(os.Stdout) flag.Usage = usage envflag.Parse() + pushmetrics.Init() buildinfo.Init() logger.Init() diff --git a/app/vmstorage/main.go b/app/vmstorage/main.go index 4ef614eab5..6cfeabe066 100644 --- a/app/vmstorage/main.go +++ b/app/vmstorage/main.go @@ -19,6 +19,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/mergeset" "github.com/VictoriaMetrics/VictoriaMetrics/lib/procutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/protoparser/common" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/pushmetrics" "github.com/VictoriaMetrics/VictoriaMetrics/lib/storage" "github.com/VictoriaMetrics/metrics" ) @@ -65,6 +66,7 @@ func main() { flag.CommandLine.SetOutput(os.Stdout) flag.Usage = usage envflag.Parse() + pushmetrics.Init() buildinfo.Init() logger.Init() diff --git a/docs/README.md b/docs/README.md index fa14d3b318..1e7dd09757 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1632,6 +1632,20 @@ See also more advanced [cardinality limiter in vmagent](https://docs.victoriamet See also [troubleshooting docs](https://docs.victoriametrics.com/Troubleshooting.html). +## Push metrics + +All the VictoriaMetrics apps support pushing their metrics exposed at `/metrics` page to remote storage in Prometheus text exposition format. This can be done by specifying the following command-line flags: + +* `-pushmetrics.url` - the url to push metrics to. For example, `-pushmetrics.url=http://victoria-metrics:8428/api/v1/import/prometheus` instructs to push internal metrics to `/api/v1/import/prometheus` endpoint according to [these docs](#how-to-import-data-in-prometheus-exposition-format). The `-pushmetrics.url` can be specified multiple times. In this case metrics are pushed to all the specified urls. The url can contain basic auth params in the form http://user:pass@hostname/api/v1/import/prometheus . +* `-pushmetrics.interval` - the interval between pushes. By default it is set to 10 seconds. +* `-pushmetrics.extraLabel` - label to add to all the metrics before sending them to `-pushmetrics.url`. The label must be specified in the format `label="value"`. It is OK to specify multiple `-pushmetrics.extraLabel` command-line flags. In this case all the specified labels are added to all the metrics sending them to `-pushmetrics.url`. + +For example, the following command instructs VictoriaMetrics to push metrics from `/metrics` page to `https://maas.victoriametrics.com/api/v1/import/prometheus` with `user:pass` [Basic auth](https://en.wikipedia.org/wiki/Basic_access_authentication). The `instance="foobar"` and `job="vm"` labels are added to all the metrics before sending them to the remote storage: + +```console +/path/to/victoria-metrics -pushmetrics.url=https://user:pass@maas.victoriametrics.com/api/v1/import/prometheus -pushmetrics.extraLabel='instance="foobar",job="vm"' +``` + ## Cache removal VictoriaMetrics uses various internal caches. These caches are stored to `<-storageDataPath>/cache` directory during graceful shutdown (e.g. when VictoriaMetrics is stopped by sending `SIGINT` signal). The caches are read on the next VictoriaMetrics startup. Sometimes it is needed to remove such caches on the next startup. This can be performed by placing `reset_cache_on_startup` file inside the `<-storageDataPath>/cache` directory before the restart of VictoriaMetrics. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1447) for details. @@ -2086,6 +2100,14 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li Whether to suppress scrape errors logging. The last error for each target is always available at '/targets' page even if scrape errors logging is suppressed. See also -promscrape.suppressScrapeErrorsDelay -promscrape.suppressScrapeErrorsDelay duration The delay for suppressing repeated scrape errors logging per each scrape targets. This may be used for reducing the number of log lines related to scrape errors. See also -promscrape.suppressScrapeErrors + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -relabelConfig string Optional path to a file with relabeling rules, which are applied to all the ingested metrics. The path can point either to local file or to http url. See https://docs.victoriametrics.com/#relabeling for details. The config is reloaded on SIGHUP signal -relabelDebug diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index 7c5d762ce7..1ab5670b65 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -1642,12 +1642,12 @@ All the VictoriaMetrics apps support pushing their metrics exposed at `/metrics` * `-pushmetrics.url` - the url to push metrics to. For example, `-pushmetrics.url=http://victoria-metrics:8428/api/v1/import/prometheus` instructs to push internal metrics to `/api/v1/import/prometheus` endpoint according to [these docs](#how-to-import-data-in-prometheus-exposition-format). The `-pushmetrics.url` can be specified multiple times. In this case metrics are pushed to all the specified urls. The url can contain basic auth params in the form http://user:pass@hostname/api/v1/import/prometheus . * `-pushmetrics.interval` - the interval between pushes. By default it is set to 10 seconds. -* `-pushmetrics.extraLabels` - the list of labels to add to all the metrics before sending them to `-pushmetrics.url`. +* `-pushmetrics.extraLabel` - label to add to all the metrics before sending them to `-pushmetrics.url`. The label must be specified in the format `label="value"`. It is OK to specify multiple `-pushmetrics.extraLabel` command-line flags. In this case all the specified labels are added to all the metrics sending them to `-pushmetrics.url`. -For example, the following command instructs VictoriaMetrics to push metrics from `/metrics` page to `https://maas.victoriametrics.com/api/v1/import/prometheus` with `user:pass` [Basic auth](https://en.wikipedia.org/wiki/Basic_access_authentication): +For example, the following command instructs VictoriaMetrics to push metrics from `/metrics` page to `https://maas.victoriametrics.com/api/v1/import/prometheus` with `user:pass` [Basic auth](https://en.wikipedia.org/wiki/Basic_access_authentication). The `instance="foobar"` and `job="vm"` labels are added to all the metrics before sending them to the remote storage: ```console -/path/to/victoria-metrics -pushmetrics.url=https://user:pass@maas.victoriametrics.com/api/v1/import/prometheus +/path/to/victoria-metrics -pushmetrics.url=https://user:pass@maas.victoriametrics.com/api/v1/import/prometheus -pushmetrics.extraLabel='instance="foobar",job="vm"' ``` ## Cache removal @@ -2104,6 +2104,14 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li Whether to suppress scrape errors logging. The last error for each target is always available at '/targets' page even if scrape errors logging is suppressed. See also -promscrape.suppressScrapeErrorsDelay -promscrape.suppressScrapeErrorsDelay duration The delay for suppressing repeated scrape errors logging per each scrape targets. This may be used for reducing the number of log lines related to scrape errors. See also -promscrape.suppressScrapeErrors + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -relabelConfig string Optional path to a file with relabeling rules, which are applied to all the ingested metrics. The path can point either to local file or to http url. See https://docs.victoriametrics.com/#relabeling for details. The config is reloaded on SIGHUP signal -relabelDebug diff --git a/docs/vmagent.md b/docs/vmagent.md index c05d37c4c3..13233d0dc8 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -1083,6 +1083,14 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . Whether to suppress scrape errors logging. The last error for each target is always available at '/targets' page even if scrape errors logging is suppressed. See also -promscrape.suppressScrapeErrorsDelay -promscrape.suppressScrapeErrorsDelay duration The delay for suppressing repeated scrape errors logging per each scrape targets. This may be used for reducing the number of log lines related to scrape errors. See also -promscrape.suppressScrapeErrors + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -remoteWrite.aws.accessKey array Optional AWS AccessKey to use for the corresponding -remoteWrite.url if -remoteWrite.aws.useSigv4 is set Supports an array of values separated by comma or specified via multiple flags. diff --git a/docs/vmalert.md b/docs/vmalert.md index 6e3ca4fc16..7c5eb39a71 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -791,6 +791,14 @@ The shortlist of configuration flags is the following: The maximum duration for waiting to perform API requests if more than -promscrape.discovery.concurrency requests are simultaneously performed (default 1m0s) -promscrape.dnsSDCheckInterval duration Interval for checking for changes in dns. This works only if dns_sd_configs is configured in '-promscrape.config' file. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config for details (default 30s) + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -remoteRead.basicAuth.password string Optional basic auth password for -remoteRead.url -remoteRead.basicAuth.passwordFile string diff --git a/docs/vmauth.md b/docs/vmauth.md index fb41219242..5a7601d114 100644 --- a/docs/vmauth.md +++ b/docs/vmauth.md @@ -292,6 +292,14 @@ See the docs at https://docs.victoriametrics.com/vmauth.html . Auth key for /metrics endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -reloadAuthKey string Auth key for /-/reload http endpoint. It must be passed as authKey=... -tls diff --git a/docs/vmbackup.md b/docs/vmbackup.md index a4573a8074..76956a0a5d 100644 --- a/docs/vmbackup.md +++ b/docs/vmbackup.md @@ -243,6 +243,14 @@ See [this article](https://medium.com/@valyala/speeding-up-backups-for-big-time- Optional origin directory on the remote storage with old backup for server-side copying when performing full backup. This speeds up full backups -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -s3ForcePathStyle Prefixing endpoint with bucket name when set false, true by default. (default true) -snapshot.createURL string diff --git a/docs/vmbackupmanager.md b/docs/vmbackupmanager.md index d1686c426e..91f27ed36a 100644 --- a/docs/vmbackupmanager.md +++ b/docs/vmbackupmanager.md @@ -242,6 +242,14 @@ vmbackupmanager performs regular backups according to the provided configs. Auth key for /metrics endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -runOnStart Upload backups immediately after start of the service. Otherwise the backup starts on new hour -s3ForcePathStyle diff --git a/docs/vmgateway.md b/docs/vmgateway.md index f697c46f22..0657bffe4c 100644 --- a/docs/vmgateway.md +++ b/docs/vmgateway.md @@ -285,6 +285,14 @@ The shortlist of configuration flags include the following: Auth key for /metrics endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -ratelimit.config string path for configuration file. Accepts url address -ratelimit.configCheckInterval duration diff --git a/docs/vmrestore.md b/docs/vmrestore.md index 009bc4be79..bd87fa3643 100644 --- a/docs/vmrestore.md +++ b/docs/vmrestore.md @@ -145,6 +145,14 @@ i.e. the end result would be similar to [rsync --delete](https://askubuntu.com/q Auth key for /metrics endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -pushmetrics.extraLabels array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabels='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url + Supports an array of values separated by comma or specified via multiple flags. + -pushmetrics.interval duration + Interval for pushing metrics to -pushmetrics.url (default 10s) + -pushmetrics.url array + Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage + Supports an array of values separated by comma or specified via multiple flags. -s3ForcePathStyle Prefixing endpoint with bucket name when set false, true by default. (default true) -skipBackupCompleteCheck