From 3dddf700f1902161826df8447b5cdf249b685d01 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 13 Feb 2024 20:47:43 +0200 Subject: [PATCH] docs: add link to https://docs.victoriametrics.com/scrape_config_examples/ to docs about configuring target scraping at vmagent and single-node VictoriaMetrics --- README.md | 11 +++++++++-- docs/README.md | 11 +++++++++-- docs/Single-server-VictoriaMetrics.md | 11 +++++++++-- docs/vmagent.md | 10 +++++++--- 4 files changed, 34 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cb6c2e80c..b0186782e 100644 --- a/README.md +++ b/README.md @@ -465,11 +465,18 @@ Prometheus doesn't drop data during VictoriaMetrics restart. See [this article]( ## How to scrape Prometheus exporters such as [node-exporter](https://github.com/prometheus/node_exporter) -VictoriaMetrics can be used as drop-in replacement for Prometheus for scraping targets configured in `prometheus.yml` config file according to [the specification](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration-file). Just set `-promscrape.config` command-line flag to the path to `prometheus.yml` config - and VictoriaMetrics should start scraping the configured targets. If the provided configuration file contains [unsupported options](https://docs.victoriametrics.com/vmagent.html#unsupported-prometheus-config-sections), then either delete them from the file or just pass `-promscrape.config.strictParse=false` command-line flag to VictoriaMetrics, so it will ignore unsupported options. +VictoriaMetrics can be used as drop-in replacement for Prometheus for scraping targets configured in `prometheus.yml` config file +according to [the specification](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration-file). +Just set `-promscrape.config` command-line flag to the path to `prometheus.yml` config - and VictoriaMetrics should start scraping the configured targets. +If the provided configuration file contains [unsupported options](https://docs.victoriametrics.com/vmagent.html#unsupported-prometheus-config-sections), +then either delete them from the file or just pass `-promscrape.config.strictParse=false` command-line flag to VictoriaMetrics, so it will ignore unsupported options. The file pointed by `-promscrape.config` may contain `%{ENV_VAR}` placeholders, which are substituted by the corresponding `ENV_VAR` environment variable values. -See [the list of supported service discovery types for Prometheus scrape targets](https://docs.victoriametrics.com/sd_configs.html). +See also: + +- [scrape config examples](https://docs.victoriametrics.com/scrape_config_examples/) +- [the list of supported service discovery types for Prometheus scrape targets](https://docs.victoriametrics.com/sd_configs.html) VictoriaMetrics also supports [importing data in Prometheus exposition format](#how-to-import-data-in-prometheus-exposition-format). diff --git a/docs/README.md b/docs/README.md index 8bf5e6622..70f33b4c5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -468,11 +468,18 @@ Prometheus doesn't drop data during VictoriaMetrics restart. See [this article]( ## How to scrape Prometheus exporters such as [node-exporter](https://github.com/prometheus/node_exporter) -VictoriaMetrics can be used as drop-in replacement for Prometheus for scraping targets configured in `prometheus.yml` config file according to [the specification](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration-file). Just set `-promscrape.config` command-line flag to the path to `prometheus.yml` config - and VictoriaMetrics should start scraping the configured targets. If the provided configuration file contains [unsupported options](https://docs.victoriametrics.com/vmagent.html#unsupported-prometheus-config-sections), then either delete them from the file or just pass `-promscrape.config.strictParse=false` command-line flag to VictoriaMetrics, so it will ignore unsupported options. +VictoriaMetrics can be used as drop-in replacement for Prometheus for scraping targets configured in `prometheus.yml` config file +according to [the specification](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration-file). +Just set `-promscrape.config` command-line flag to the path to `prometheus.yml` config - and VictoriaMetrics should start scraping the configured targets. +If the provided configuration file contains [unsupported options](https://docs.victoriametrics.com/vmagent.html#unsupported-prometheus-config-sections), +then either delete them from the file or just pass `-promscrape.config.strictParse=false` command-line flag to VictoriaMetrics, so it will ignore unsupported options. The file pointed by `-promscrape.config` may contain `%{ENV_VAR}` placeholders, which are substituted by the corresponding `ENV_VAR` environment variable values. -See [the list of supported service discovery types for Prometheus scrape targets](https://docs.victoriametrics.com/sd_configs.html). +See also: + +- [scrape config examples](https://docs.victoriametrics.com/scrape_config_examples/) +- [the list of supported service discovery types for Prometheus scrape targets](https://docs.victoriametrics.com/sd_configs.html) VictoriaMetrics also supports [importing data in Prometheus exposition format](#how-to-import-data-in-prometheus-exposition-format). diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index fa8db523d..aaeb0c1aa 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -476,11 +476,18 @@ Prometheus doesn't drop data during VictoriaMetrics restart. See [this article]( ## How to scrape Prometheus exporters such as [node-exporter](https://github.com/prometheus/node_exporter) -VictoriaMetrics can be used as drop-in replacement for Prometheus for scraping targets configured in `prometheus.yml` config file according to [the specification](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration-file). Just set `-promscrape.config` command-line flag to the path to `prometheus.yml` config - and VictoriaMetrics should start scraping the configured targets. If the provided configuration file contains [unsupported options](https://docs.victoriametrics.com/vmagent.html#unsupported-prometheus-config-sections), then either delete them from the file or just pass `-promscrape.config.strictParse=false` command-line flag to VictoriaMetrics, so it will ignore unsupported options. +VictoriaMetrics can be used as drop-in replacement for Prometheus for scraping targets configured in `prometheus.yml` config file +according to [the specification](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration-file). +Just set `-promscrape.config` command-line flag to the path to `prometheus.yml` config - and VictoriaMetrics should start scraping the configured targets. +If the provided configuration file contains [unsupported options](https://docs.victoriametrics.com/vmagent.html#unsupported-prometheus-config-sections), +then either delete them from the file or just pass `-promscrape.config.strictParse=false` command-line flag to VictoriaMetrics, so it will ignore unsupported options. The file pointed by `-promscrape.config` may contain `%{ENV_VAR}` placeholders, which are substituted by the corresponding `ENV_VAR` environment variable values. -See [the list of supported service discovery types for Prometheus scrape targets](https://docs.victoriametrics.com/sd_configs.html). +See also: + +- [scrape config examples](https://docs.victoriametrics.com/scrape_config_examples/) +- [the list of supported service discovery types for Prometheus scrape targets](https://docs.victoriametrics.com/sd_configs.html) VictoriaMetrics also supports [importing data in Prometheus exposition format](#how-to-import-data-in-prometheus-exposition-format). diff --git a/docs/vmagent.md b/docs/vmagent.md index 52e0db195..6e3dde75c 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -63,8 +63,9 @@ unpack it and pass the following flags to the `vmagent` binary in order to start and sending the data to the Prometheus-compatible remote storage: * `-promscrape.config` with the path to [Prometheus config file](https://docs.victoriametrics.com/sd_configs.html) (usually located at `/etc/prometheus/prometheus.yml`). - The path can point either to local file or to http url. `vmagent` doesn't support some sections of Prometheus config file, - so you may need either to delete these sections or to run `vmagent` with `-promscrape.config.strictParse=false` command-line flag. + The path can point either to local file or to http url. See [scrape config examples](https://docs.victoriametrics.com/scrape_config_examples/). + `vmagent` doesn't support some sections of Prometheus config file, so you may need either to delete these sections or + to run `vmagent` with `-promscrape.config.strictParse=false` command-line flag. In this case `vmagent` ignores unsupported sections. See [the list of unsupported sections](#unsupported-prometheus-config-sections). * `-remoteWrite.url` with Prometheus-compatible remote storage endpoint such as VictoriaMetrics, where to send the data to. @@ -319,7 +320,10 @@ Use `-remoteWrite.*` command-line flag instead for configuring remote write sett The file pointed by `-promscrape.config` may contain `%{ENV_VAR}` placeholders which are substituted by the corresponding `ENV_VAR` environment variable values. -See [the list of supported service discovery types for Prometheus scrape targets](https://docs.victoriametrics.com/sd_configs.html). +See also: + +- [scrape config examples](https://docs.victoriametrics.com/scrape_config_examples/) +- [the list of supported service discovery types for Prometheus scrape targets](https://docs.victoriametrics.com/sd_configs.html). ## scrape_config enhancements