diff --git a/README.md b/README.md index 845696072..3b592a3b4 100644 --- a/README.md +++ b/README.md @@ -2101,8 +2101,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/app/vmagent/README.md b/app/vmagent/README.md index 2256f38a6..25297e427 100644 --- a/app/vmagent/README.md +++ b/app/vmagent/README.md @@ -1079,8 +1079,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/app/vmalert/README.md b/app/vmalert/README.md index d3c52e692..5036f27b3 100644 --- a/app/vmalert/README.md +++ b/app/vmalert/README.md @@ -799,8 +799,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/app/vmauth/README.md b/app/vmauth/README.md index 1f102bb8f..78239ff9d 100644 --- a/app/vmauth/README.md +++ b/app/vmauth/README.md @@ -288,8 +288,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/app/vmbackup/README.md b/app/vmbackup/README.md index 41b5fb5b9..d0660255d 100644 --- a/app/vmbackup/README.md +++ b/app/vmbackup/README.md @@ -239,8 +239,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/app/vmbackupmanager/README.md b/app/vmbackupmanager/README.md index 0645145fe..eb2b6193a 100644 --- a/app/vmbackupmanager/README.md +++ b/app/vmbackupmanager/README.md @@ -238,8 +238,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/app/vmgateway/README.md b/app/vmgateway/README.md index 5eefc78f2..8bbbecc98 100644 --- a/app/vmgateway/README.md +++ b/app/vmgateway/README.md @@ -281,8 +281,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/app/vmrestore/README.md b/app/vmrestore/README.md index 1551d2549..4bdec766e 100644 --- a/app/vmrestore/README.md +++ b/app/vmrestore/README.md @@ -141,8 +141,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index 86d237abc..752c3ef54 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -648,8 +648,8 @@ Below is the output for `/path/to/vminsert -help`: Trim timestamps for OpenTSDB HTTP data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms) -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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) @@ -786,8 +786,8 @@ Below is the output for `/path/to/vmselect -help`: 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) @@ -978,8 +978,8 @@ Below is the output for `/path/to/vmstorage -help`: Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings -precisionBits int The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64) - -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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/docs/README.md b/docs/README.md index 845696072..3b592a3b4 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2101,8 +2101,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index a45a583f6..debd98861 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -2105,8 +2105,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/docs/vmagent.md b/docs/vmagent.md index 13233d0dc..72e16b1e1 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -1083,8 +1083,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/docs/vmalert.md b/docs/vmalert.md index 02a9b4701..40c51ab45 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -803,8 +803,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/docs/vmauth.md b/docs/vmauth.md index 5a7601d11..f2578ac6b 100644 --- a/docs/vmauth.md +++ b/docs/vmauth.md @@ -292,8 +292,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/docs/vmbackup.md b/docs/vmbackup.md index 76956a0a5..8f6a614cd 100644 --- a/docs/vmbackup.md +++ b/docs/vmbackup.md @@ -243,8 +243,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/docs/vmbackupmanager.md b/docs/vmbackupmanager.md index 91f27ed36..04b92e935 100644 --- a/docs/vmbackupmanager.md +++ b/docs/vmbackupmanager.md @@ -242,8 +242,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/docs/vmgateway.md b/docs/vmgateway.md index 4e300f9b5..240215037 100644 --- a/docs/vmgateway.md +++ b/docs/vmgateway.md @@ -285,8 +285,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/docs/vmrestore.md b/docs/vmrestore.md index bd87fa364..3516d91d6 100644 --- a/docs/vmrestore.md +++ b/docs/vmrestore.md @@ -145,8 +145,8 @@ 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 + -pushmetrics.extraLabel array + Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='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) diff --git a/lib/pushmetrics/pushmetrics.go b/lib/pushmetrics/pushmetrics.go index 6150d843f..4a95aa630 100644 --- a/lib/pushmetrics/pushmetrics.go +++ b/lib/pushmetrics/pushmetrics.go @@ -15,8 +15,8 @@ var ( pushURL = flagutil.NewArray("pushmetrics.url", "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") pushInterval = flag.Duration("pushmetrics.interval", 10*time.Second, "Interval for pushing metrics to -pushmetrics.url") - pushExtraLabels = flagutil.NewArray("pushmetrics.extraLabels", "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`) + pushExtraLabel = flagutil.NewArray("pushmetrics.extraLabel", "Optional labels to add to metrics pushed to -pushmetrics.url . "+ + `For example, -pushmetrics.extraLabel='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url`) ) func init() { @@ -26,7 +26,7 @@ func init() { // Init must be called after logger.Init func Init() { - extraLabels := strings.Join(*pushExtraLabels, ",") + extraLabels := strings.Join(*pushExtraLabel, ",") for _, pu := range *pushURL { if err := metrics.InitPushExt(pu, *pushInterval, extraLabels, appmetrics.WritePrometheusMetrics); err != nil { logger.Fatalf("cannot initialize pushmetrics: %s", err)