Skip to content

Instantly share code, notes, and snippets.

@LnL7
Created April 24, 2020 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LnL7/65f003b3bef1adb043451f859a6e8fea to your computer and use it in GitHub Desktop.
Save LnL7/65f003b3bef1adb043451f859a6e8fea to your computer and use it in GitHub Desktop.
scrape_configs:
- job_name: 'python-service'
relabel_configs:
- source_labels: [__meta_dns_name]
target_label: instance
- source_labels: [__address__]
target_label: port
regex: '.*:(.*)'
dns_sd_configs:
- names:
- tasks.uwsgi
type: 'A'
port: 9001
- names:
- tasks.uwsgi
type: 'A'
port: 9002
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment