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
d3296a4a
Commit
d3296a4a
authored
Aug 04, 2015
by
Julius Volz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add/improve docs around honor_labels and conflict handling.
parent
44f2a566
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
jobs_instances.md
content/docs/concepts/jobs_instances.md
+4
-5
configuration.md
content/docs/operating/configuration.md
+16
-0
No files found.
content/docs/concepts/jobs_instances.md
View file @
d3296a4a
...
@@ -25,11 +25,10 @@ scraped time series which serve to identify the scraped target:
...
@@ -25,11 +25,10 @@ scraped time series which serve to identify the scraped target:
*
`job`
: The configured job name that the target belongs to.
*
`job`
: The configured job name that the target belongs to.
*
`instance`
: The
`<host>:<port>`
part of the target's URL that was scraped.
*
`instance`
: The
`<host>:<port>`
part of the target's URL that was scraped.
If either of these labels are already present in the scraped data, Prometheus
If either of these labels are already present in the scraped data, the behavior
does not replace their values. Instead, it adds new labels with an
`exporter_`
depends on the
`honor_labels`
configuration option. See the
prefix prepended to the label name:
`exporter_job`
and
`exporter_instance`
. The
[
scrape configuration documentation
](
/docs/operating/configuration/#scrape-configurations-scrape_config
)
same pattern holds true for any labels that have been manually configured for a
for more information.
target group. This enables intermediary exporters to proxy metrics.
For each instance scrape, Prometheus stores a sample of the form
For each instance scrape, Prometheus stores a sample of the form
`up{job="<job-name>", instance="<instance-id>"}`
with a value of
`1`
if the
`up{job="<job-name>", instance="<instance-id>"}`
with a value of
`1`
if the
...
...
content/docs/operating/configuration.md
View file @
d3296a4a
...
@@ -35,6 +35,7 @@ Generic placeholders are defined as follows:
...
@@ -35,6 +35,7 @@ Generic placeholders are defined as follows:
*
`<labelname>`
: a string matching the regular expression
`[a-zA-Z_][a-zA-Z0-9_]*`
*
`<labelname>`
: a string matching the regular expression
`[a-zA-Z_][a-zA-Z0-9_]*`
*
`<labelvalue>`
: a string of unicode characters
*
`<labelvalue>`
: a string of unicode characters
*
`<filename>`
: a valid path in the current working directory
*
`<filename>`
: a valid path in the current working directory
*
`<boolean>`
: a boolean that can take the values
`true`
or
`false`
The other placeholders are specified separately.
The other placeholders are specified separately.
...
@@ -94,6 +95,21 @@ job_name: <name>
...
@@ -94,6 +95,21 @@ job_name: <name>
# The HTTP resource path on which to fetch metrics from targets.
# The HTTP resource path on which to fetch metrics from targets.
[ metrics_path: <path> | default = /metrics ]
[ metrics_path: <path> | default = /metrics ]
# honor_labels controls how Prometheus handles conflicts between labels that are
# already present in scraped data and labels that Prometheus would attach
# server-side ("job" and "instance" labels, global labels, manually configured
# target labels, and labels generated by service discovery implementations).
#
# If honor_labels is set to "true", label conflicts are resolved by keeping label
# values from the scraped data and ignoring the conflicting server-side labels.
#
# If honor_labels is set to "false", label conflicts are resolved by renaming
# conflicting labels in the scraped data to "exported_<original-label>" (for
# example "exported_instance", "exported_job") and then attaching server-side
# labels. This is useful for use cases such as federation, where all labels
# specified in the target should be preserved.
[ honor_labels: <boolean> | default = false ]
# The URL scheme with which to fetch metrics from targets.
# The URL scheme with which to fetch metrics from targets.
[ scheme: <scheme> | default = http ]
[ scheme: <scheme> | default = http ]
...
...
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