From 9c763490b786bc06a90362eb0a8de1001f87bb13 Mon Sep 17 00:00:00 2001 From: Artem Navoiev Date: Tue, 5 Jul 2022 12:06:23 +0300 Subject: [PATCH] Docs: Operator Additional Scrape Configuration - update docs (#2826) Signed-off-by: Artem Navoiev --- docs/operator/additional-scrape.MD | 35 ++++++++++++++---------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/docs/operator/additional-scrape.MD b/docs/operator/additional-scrape.MD index cf3e643b5..79711f5de 100644 --- a/docs/operator/additional-scrape.MD +++ b/docs/operator/additional-scrape.MD @@ -4,21 +4,18 @@ sort: 2 # Additional Scrape Configuration -AdditionalScrapeConfigs allows specifying a key of a Secret containing -additional Prometheus scrape configurations or define scrape configuration at CRD spec. -Scrape configurations specified -are appended to the configurations generated by the operator. +AdditionalScrapeConfigs is an additional way to add scrape targets in VMAgent CRD. +There are two options for adding targets into VMAgent: inline configuration into CRD or defining it as a Kubernetes Secret. -Job configurations specified must have the form as specified in the official -[Prometheus documentation]( -https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config). -As scrape configs are appended, the user is responsible to make sure it is -valid. +No validation happens during the creation of configuration. However, you must validate job specs, and it must follow job spec configuration. +Please check official Prometheus documentation as references. +[Prometheus documentation](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config). -## Creating an additional configuration inline at CRD +## Inline Additional Scrape Configuration in VMAgent CRD + +You need to add scrape configuration directly to the vmagent spec.inlineScrapeConfig. It is raw text in YAML format. +See example below - Add needed scrape configuration directly to the vmagent spec.inlineScrapeConfig - ```yaml cat <