Add DigitalOcean service discovery (#7407)

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
Julien Pivotto 2020-06-18 17:04:41 +02:00 committed by GitHub
parent 7b4f81b397
commit c61141ce51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 9500 additions and 0 deletions

View file

@ -0,0 +1,25 @@
# A example scrape configuration for running Prometheus with
# DigitalOcean.
scrape_configs:
# Make Prometheus scrape itself for metrics.
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
# Discover Node Exporter instances to scrape.
- job_name: 'node'
digitalocean_sd_configs:
- bearer_token: "<replace with a Personal Access Token>"
relabel_configs:
# Only scrape targets that have a tag 'monitoring'.
- source_labels: [__meta_digitalocean_tags]
regex: '.*,monitoring,.*'
action: keep
# Use the public IPv6 address and port 9100 to scrape the target.
- source_labels: [__meta_digitalocean_public_ipv6]
target_label: __address__
replacement: '[$1]:9100'