Skip to content

Commit 147da4d

Browse files
author
Linus Wallgren
committed
Add service discovery relabel example to README
1 parent 753361c commit 147da4d

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Diff for: README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,21 @@ so this workaround is required.
4848

4949
The `/clients` endpoint will return a list of all registered clients in the format
5050
used by `file_sd_configs`. You could use wget in a cronjob to put it somewhere
51-
file\_sd\_configs can read and then then relabel as needed.
51+
file\_sd\_configs can read and then then relabel as needed. For example:
52+
53+
```
54+
scrape_configs:
55+
- job_name: node
56+
proxy_url: http://proxy:8080/
57+
file_sd_configs:
58+
- files:
59+
- pushprox.json
60+
relabel_configs:
61+
- source_labels: ['__address__']
62+
regex: '(.*)'
63+
replacement: '$1:9100'
64+
target_label: '__address__'
65+
```
5266

5367
## How It Works
5468

0 commit comments

Comments
 (0)