File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change 1
1
scrape_configs :
2
2
- job_name : es-multi
3
3
metrics_path : /probe
4
+ # Default parameters for all scrapes in this job.
5
+ # Can be overridden by labels on a per-target basis.
4
6
params :
5
- auth_module : [prod_key] # default for all targets in this block
7
+ auth_module : [prod_key]
6
8
static_configs :
9
+ # This is a target group. All targets here will use the default 'prod_key' auth_module.
7
10
- targets :
8
- - https://es-prod:9200 # uses prod_key
11
+ - https://es-prod-1:9200
12
+ - https://es-prod-2:9200
13
+ # This is another target group.
9
14
- targets :
10
- - https://es-stage:9200 # will override auth_module below
15
+ - https://es-stage:9200
16
+ # The __param_ prefix on a label causes it to be added as a URL parameter.
17
+ # This will override the default auth_module for this target.
11
18
labels :
12
19
__param_auth_module : staging_basic
13
20
relabel_configs :
21
+ # The following relabeling rules are applied to every target.
22
+
23
+ # 1. The special label __address__ (the target address) is saved as the 'target' URL parameter.
14
24
- source_labels : [__address__]
15
25
target_label : __param_target
26
+
27
+ # 2. The 'target' parameter is used as the 'instance' label for the scraped metrics.
16
28
- source_labels : [__param_target]
17
29
target_label : instance
30
+
31
+ # 3. The scrape address is rewritten to point to the exporter.
18
32
- target_label : __address__
19
33
replacement : exporter:9114 # host:port of the single exporter
You can’t perform that action at this time.
0 commit comments