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
bd24f5b5
Commit
bd24f5b5
authored
Jun 14, 2016
by
beorn7
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configuration: Update scrape config
parent
c87d331e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
14 deletions
+21
-14
configuration.md
content/docs/operating/configuration.md
+21
-14
No files found.
content/docs/operating/configuration.md
View file @
bd24f5b5
...
...
@@ -78,9 +78,13 @@ A `scrape_config` section specifies a set of targets and parameters describing h
to scrape them. In the general case, one scrape configuration specifies a single
job. In advanced configurations, this may change.
Targets may be statically configured via the
`
target_group
s`
parameter or
Targets may be statically configured via the
`
static_config
s`
parameter or
dynamically discovered using one of the supported service-discovery mechanisms.
NOTE: Prior to v0.20,
`target_groups`
was used instead of
`static_configs`
.
`target_groups`
can still be used alternatively in v0.20 itself, but not in
later versions.
Additionally,
`relabel_configs`
allow advanced modifications to any
target and its labels before scraping.
...
...
@@ -181,9 +185,10 @@ ec2_sd_configs:
file_sd_configs:
[ - <file_sd_config> ... ]
# List of labeled target groups for this job.
target_groups:
[ - <target_group> ... ]
# List of labeled statically configured targets for this job.
# Known as target_groups prior to v0.20.
static_configs:
[ - <static_config> ... ]
# List of target relabel configurations.
relabel_configs:
...
...
@@ -220,13 +225,14 @@ A `tls_config` allows configuring TLS connections.
```
### `<
target_group
>`
### `<
static_config
>`
A
`target_group`
allows specifying a list of targets and a common label set for them.
They are the canonical way to specify static targets in a scrape configuration.
A
`static_confic`
allows specifying a list of targets and a common label set
for them. It is the canonical way to specify static targets in a scrape
configuration.
```
# The targets specified by the
target group
.
# The targets specified by the
static config
.
targets:
[ - '<host>' ]
...
...
@@ -517,12 +523,12 @@ region: <string>
File-based service discovery provides a more generic 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-formed target groups
are applied.
It reads a set of files containing a list of zero or more
`<static_config>`
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-formed target groups
are applied.
The JSON file must contain a list of
target group
s, using this format:
The JSON file must contain a list of
static config
s, using this format:
```
[
...
...
@@ -545,7 +551,7 @@ filepath from which the target was extracted.
```
# Patterns for files from which target groups are extracted.
nam
es:
fil
es:
[ - <filename_pattern> ... ]
# Refresh interval to re-read the files.
...
...
@@ -555,6 +561,7 @@ names:
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`
.
NOTE: Prior to v0.20,
`names:`
was used instead of
`files:`
.
### `<relabel_config>`
...
...
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