From 019d031f3e9d022fa7b6c78d6c4f1e6fc530aaf7 Mon Sep 17 00:00:00 2001 From: Lars Nielsen Date: Mon, 3 Aug 2020 16:36:33 +0200 Subject: [PATCH] Updated documentation (#5390) Updated documentation to include YAML example for file_sd_config Signed-off-by: Lars Nielsen --- docs/configuration/configuration.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index c3857bdf7..f1c387c5c 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -811,9 +811,10 @@ It reads a set of files containing a list of zero or more and applied immediately. Files may be provided in YAML or JSON format. Only changes resulting in well-formed target groups are applied. -The JSON file must contain a list of static configs, using this format: +Files must contain a list of static configs, using these formats: -```yaml +**JSON** +```json [ { "targets": [ "", ... ], @@ -825,6 +826,14 @@ The JSON file must contain a list of static configs, using this format: ] ``` +**YAML** +```yaml +- targets: + [ - '' ] + labels: + [ : ... ] +``` + As a fallback, the file contents are also re-read periodically at the specified refresh interval.