Skip to content

Commit 94732c6

Browse files
committed
Update example-prometheus.yml
Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
1 parent 057619c commit 94732c6

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

examples/example-prometheus.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
11
scrape_configs:
22
- job_name: es-multi
33
metrics_path: /probe
4+
# Default parameters for all scrapes in this job.
5+
# Can be overridden by labels on a per-target basis.
46
params:
5-
auth_module: [prod_key] # default for all targets in this block
7+
auth_module: [prod_key]
68
static_configs:
9+
# This is a target group. All targets here will use the default 'prod_key' auth_module.
710
- 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.
914
- 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.
1118
labels:
1219
__param_auth_module: staging_basic
1320
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.
1424
- source_labels: [__address__]
1525
target_label: __param_target
26+
27+
# 2. The 'target' parameter is used as the 'instance' label for the scraped metrics.
1628
- source_labels: [__param_target]
1729
target_label: instance
30+
31+
# 3. The scrape address is rewritten to point to the exporter.
1832
- target_label: __address__
1933
replacement: exporter:9114 # host:port of the single exporter

0 commit comments

Comments
 (0)