Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
docs
Commits
a4933287
Commit
a4933287
authored
May 20, 2015
by
Julius Volz
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #87 from fabxc/fabxc/file_sd
Add config docs for file discovery
parents
68bc4b83
77f51260
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
configuration.md
content/docs/operating/configuration.md
+43
-0
No files found.
content/docs/operating/configuration.md
View file @
a4933287
...
...
@@ -101,6 +101,10 @@ dns_sd_configs:
consul_sd_configs:
[ - <consul_sd_config> ... ]
# List of file service discovery configurations.
file_sd_configs:
[ - <file_sd_config> ... ]
# List of labeled target groups for this job.
target_groups:
[ - <target_group> ... ]
...
...
@@ -185,6 +189,45 @@ services:
```
### File based SD configurations `<file_sd_config>`
File based service discovery provides a more dynamic way to configure static targets
and serves as an interface to plug in custom service discovery mechanisms.
It reads a set of files containing a list of zero or more
`<target_group>`
s. Changes to
all defined files are detected via disk watches and applied immediately. Files may be
provided in YAML or JSON format. Only changes resulting in well-formatted target groups
are applied.
The JSON version of a target group has the following format:
```
{
"targets": [ "<host>", ... ],
"labels": {
[ "<labelname>": "<labelvalue>", ... ]
}
}
```
As a fallback, the file contents are re-read in the specified refresh interval.
Each target has the
`__meta_filepath`
label attached. Its value is set to the filepath
from which the target was extracted.
```
# Patterns for files from which target groups are extracted.
names:
[ - <filename_pattern> ... ]
# Refresh interval to re-read the files.
[ refresh_interval: <duration> | default = 30s ]
```
Where
`<filename_pattern>`
may be a path ending in
`.json`
,
`.yml`
or
`.yaml`
. The last path segment
may contain a single
`*`
that matches any character sequence, e.g.
`my/path/tg_*.json`
.
### Relabeling `<relabel_config>`
Relabeling is a powerful tool to dynamically rewrite the label set of a target before
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment