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
10bad374
Commit
10bad374
authored
Apr 15, 2016
by
Marc Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken references to html anchors.
parent
6b641a45
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
2015-06-01-advanced-service-discovery.md
content/blog/2015-06-01-advanced-service-discovery.md
+4
-4
configuration.md
content/docs/operating/configuration.md
+3
-3
No files found.
content/blog/2015-06-01-advanced-service-discovery.md
View file @
10bad374
...
...
@@ -35,7 +35,7 @@ labels set by an earlier stage:
1.
Global labels, which are assigned to every target scraped by the Prometheus instance.
2.
The
`job`
label, which is configured as a default value for each scrape configuration.
3.
Labels that are set per target group within a scrape configuration.
4.
Advanced label manipulation via
[
_relabeling_
](
/docs/operating/configuration/#
target-relabeling-
relabel_config
)
.
4.
Advanced label manipulation via
[
_relabeling_
](
/docs/operating/configuration/#relabel_config
)
.
Each stage overwrites any colliding labels from the earlier stages. Eventually, we have a flat
set of labels that describe a single target. Those labels are then attached to every time series that
...
...
@@ -76,7 +76,7 @@ scrape_configs:
job: 'job2'
```
Through a mechanism named
[
_relabeling_
](
http://prometheus.io/docs/operating/configuration/#
target-relabeling-
relabel_config
)
,
Through a mechanism named
[
_relabeling_
](
http://prometheus.io/docs/operating/configuration/#relabel_config
)
,
any label can be removed, created, or modified on a per-target level. This
enables fine-grained labeling that can also take into account metadata coming
from the service discovery. Relabeling is the last stage of label assignment
...
...
@@ -124,7 +124,7 @@ This rule transforms a target with the label set:
You could then also remove the source labels in an additional relabeling step.
You can read more about relabeling and how you can use it to filter targets in the
[
configuration documentation
](
/docs/operating/configuration#
target-relabeling-
relabel_config
)
.
[
configuration documentation
](
/docs/operating/configuration#relabel_config
)
.
Over the next sections, we will see how you can leverage relabeling when using service discovery.
...
...
@@ -219,7 +219,7 @@ has the `production` or `canary` Consul tag, a respective `group` label is assig
Each target's
`instance`
label is set to the node name provided by Consul.
A full documentation of all configuration parameters for service discovery via Consul
can be found on the
[
Prometheus website
](
/docs/operating/configuration#
target-relabeling-
relabel_config
)
.
can be found on the
[
Prometheus website
](
/docs/operating/configuration#relabel_config
)
.
## Custom service discovery
...
...
content/docs/operating/configuration.md
View file @
10bad374
...
...
@@ -241,7 +241,7 @@ A DNS-SD configuration allows specifying a set of DNS record names which
are periodically queried to discover a list of targets (host-port pairs). The
DNS servers to be contacted are read from
`/etc/resolv.conf`
.
During the
[
relabeling phase
](
#
target-relabeling-
relabel_config
)
, the meta
During the
[
relabeling phase
](
#relabel_config
)
, the meta
label
`__meta_dns_name`
is available on each target and is set to the SRV
record name that produced the discovered target.
...
...
@@ -301,7 +301,7 @@ services:
Note that the IP number and port used to scrape the targets is assembled as
`<__meta_consul_address>:<__meta_consul_service_port>`
. However, in some
Consul setups, the relevant address is in
`__meta_consul_service_address`
.
In those cases, you can use the
[
relabel
](
#
target-relabeling-
relabel_config
)
In those cases, you can use the
[
relabel
](
#relabel_config
)
feature to replace the special
`__address__`
label.
### `<kubernetes_sd_config>`
...
...
@@ -530,7 +530,7 @@ As a fallback, the file contents are also re-read periodically at the specified
refresh interval.
Each target has a meta label
`__meta_filepath`
during the
[
relabeling phase
](
#
target-relabeling-
relabel_config
)
. Its value is set to the
[
relabeling phase
](
#relabel_config
)
. Its value is set to the
filepath from which the target was extracted.
```
...
...
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