Skip to content

Commit

Permalink
Add service discovery relabel example to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Wallgren committed Sep 2, 2020
1 parent 753361c commit 147da4d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,21 @@ so this workaround is required.

The `/clients` endpoint will return a list of all registered clients in the format
used by `file_sd_configs`. You could use wget in a cronjob to put it somewhere
file\_sd\_configs can read and then then relabel as needed.
file\_sd\_configs can read and then then relabel as needed. For example:

```
scrape_configs:
- job_name: node
proxy_url: http://proxy:8080/
file_sd_configs:
- files:
- pushprox.json
relabel_configs:
- source_labels: ['__address__']
regex: '(.*)'
replacement: '$1:9100'
target_label: '__address__'
```

## How It Works

Expand Down

0 comments on commit 147da4d

Please sign in to comment.