2021-06-01 11:32:36 -07:00
|
|
|
# A example scrape configuration for running Prometheus with
|
|
|
|
# Linode.
|
|
|
|
|
|
|
|
scrape_configs:
|
|
|
|
# Make Prometheus scrape itself for metrics.
|
2021-06-12 03:47:47 -07:00
|
|
|
- job_name: "prometheus"
|
2021-06-01 11:32:36 -07:00
|
|
|
static_configs:
|
2021-06-12 03:47:47 -07:00
|
|
|
- targets: ["localhost:9090"]
|
2021-06-01 11:32:36 -07:00
|
|
|
|
|
|
|
# Discover Node Exporter instances to scrape.
|
2021-06-12 03:47:47 -07:00
|
|
|
- job_name: "node"
|
2021-06-01 11:32:36 -07:00
|
|
|
linode_sd_configs:
|
|
|
|
- authorization:
|
2022-05-25 13:46:02 -07:00
|
|
|
credentials: "<replace with a Personal Access Token with linodes:read_only, ips:read_only, and events:read_only access>"
|
2024-04-05 01:31:59 -07:00
|
|
|
region: "us-east"
|
2021-06-01 11:32:36 -07:00
|
|
|
relabel_configs:
|
|
|
|
# Only scrape targets that have a tag 'monitoring'.
|
|
|
|
- source_labels: [__meta_linode_tags]
|
2021-06-12 03:47:47 -07:00
|
|
|
regex: ".*,monitoring,.*"
|
2021-06-01 11:32:36 -07:00
|
|
|
action: keep
|
|
|
|
|
|
|
|
# Use the public IPv6 address and port 9100 to scrape the target.
|
|
|
|
- source_labels: [__meta_linode_public_ipv6]
|
|
|
|
target_label: __address__
|
2021-06-12 03:47:47 -07:00
|
|
|
replacement: "[$1]:9100"
|