Skip to content

Instantly share code, notes, and snippets.

@britcey
Created January 16, 2019 16:12
Show Gist options
  • Save britcey/586094943b69b17c84f818d1d2c636b5 to your computer and use it in GitHub Desktop.
Save britcey/586094943b69b17c84f818d1d2c636b5 to your computer and use it in GitHub Desktop.
static_configs:
- targets:
- 'https://stag-prom01.bos.example.com:443'
- 'https://stag-prom02.bos.example.com:443'
- 'https://stag-prom03.dfw.example.com:443'
- 'https://stag-prom04.dfw.example.com:443'
relabel_configs:
- source_labels: [__address__]
regex: '^https://[\w\-]+\.([\w\-]+)\.'
target_label: location
replacement: '${1}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment