mirror of
https://github.com/prometheus/prometheus.git
synced 2025-07-03 11:03:25 +00:00
discovery: add STACKIT SD (#16401)
This commit is contained in:
parent
5a1cce4fbb
commit
ceaa3bd6f9
17 changed files with 907 additions and 1 deletions
34
documentation/examples/prometheus-stackit.yml
Normal file
34
documentation/examples/prometheus-stackit.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
# A example scrape configuration for running Prometheus with
|
||||
# STACKIT.
|
||||
|
||||
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"
|
||||
|
||||
stackit_sd_configs:
|
||||
- project: 11111111-1111-1111-1111-111111111111
|
||||
authorization:
|
||||
credentials: "<replace with a STACKIT ServiceAccount Token>"
|
||||
relabel_configs:
|
||||
# Use the public IPv4 and port 9100 to scrape the target.
|
||||
- source_labels: [__meta_stackit_public_ipv4]
|
||||
target_label: __address__
|
||||
replacement: "$1:9100"
|
||||
|
||||
# Discover Node Exporter instances to scrape using a STACKIT Subnet called mynet.
|
||||
- job_name: "node_private"
|
||||
|
||||
stackit_sd_configs:
|
||||
- project: 11111111-1111-1111-1111-111111111111
|
||||
authorization:
|
||||
credentials: "<replace with a STACKIT ServiceAccount Token>"
|
||||
relabel_configs:
|
||||
# Use the private IPv4 within the STACKIT Subnet and port 9100 to scrape the target.
|
||||
- source_labels: [__meta_stackit_private_ipv4_mynet]
|
||||
target_label: __address__
|
||||
replacement: "$1:9100"
|
Loading…
Add table
Add a link
Reference in a new issue