prometheus/documentation/examples/prometheus-linode.yml
Ryan Lonergan 0505ba81e1
Fixed spacing causing "field credentials not found in type linode.plain” error (#10752)
Signed-off-by: Ryan Lonergan <rlonergan@linode.com>

Co-authored-by: Ryan Lonergan <rlonergan@linode.com>
2022-05-25 22:46:02 +02:00

25 lines
834 B
YAML

# A example scrape configuration for running Prometheus with
# Linode.
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"
linode_sd_configs:
- authorization:
credentials: "<replace with a Personal Access Token with linodes:read_only, ips:read_only, and events:read_only access>"
relabel_configs:
# Only scrape targets that have a tag 'monitoring'.
- source_labels: [__meta_linode_tags]
regex: ".*,monitoring,.*"
action: keep
# Use the public IPv6 address and port 9100 to scrape the target.
- source_labels: [__meta_linode_public_ipv6]
target_label: __address__
replacement: "[$1]:9100"