Updated documentation (#5390)

Updated documentation to include YAML example for file_sd_config

Signed-off-by: Lars Nielsen <nellemandela@gmail.com>
This commit is contained in:
Lars Nielsen 2020-08-03 16:36:33 +02:00 committed by GitHub
parent ed6ce7ac98
commit 019d031f3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -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": [ "<host>", ... ],
@ -825,6 +826,14 @@ The JSON file must contain a list of static configs, using this format:
]
```
**YAML**
```yaml
- targets:
[ - '<host>' ]
labels:
[ <labelname>: <labelvalue> ... ]
```
As a fallback, the file contents are also re-read periodically at the specified
refresh interval.