mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
7baf084092
* optimize Linode SD by polling for event changes during refresh Most accounts are fairly "static", in the sense that they're not cycling through instances constantly. So rather than do a full refresh every interval and potentially make several behind-the-scenes paginated API calls, this will now poll the `/account/events/` endpoint every minute with a list of events that we care about. If a matching event is found, we then do a full refresh. Co-authored-by: William Smith <wsmith@linode.com> Signed-off-by: TJ Hoplock <t.hoplock@gmail.com> Signed-off-by: William Smith <wsmith@linode.com>
25 lines
832 B
YAML
25 lines
832 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"
|