1
0
Fork 0

v-m: Use dynamic discovery for some collectd nodes

We don't need to explicitly specify every single host individually.
Domain controllers, for example, are registered in DNS with SRV records.
Kubernetes nodes, of course, can be discovered using the Kubernetes API.
Both of these classes of nodes change frequently, so discovering them
dynamically is convenient.
etcd
Dustin 2024-06-22 19:51:59 -05:00
parent 98651cf9d9
commit 1c4b32925e
1 changed files with 8 additions and 3 deletions

View File

@ -81,9 +81,6 @@ scrape_configs:
static_configs:
- targets:
- gw1.pyrocufflink.blue
- k8s-aarch64-n0.pyrocufflink.blue
- k8s-aarch64-n1.pyrocufflink.blue
- k8s-amd64-n3.pyrocufflink.blue
- loki0.pyrocufflink.blue
- nut0.pyrocufflink.blue
- nvr2.pyrocufflink.blue
@ -94,12 +91,20 @@ scrape_configs:
file_sd_configs:
- files:
- /scrape/collectd/scrape-collectd.yml
dns_sd_configs:
- names:
- _ldap._tcp.pyrocufflink.blue
kubernetes_sd_configs:
- role: node
relabel_configs:
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- source_labels:
- __address__
target_label: host__tmp
- source_labels: [__address__]
target_label: __address__
regex: '([^:]+)(:.*)?'
replacement: '$1:9103'
metric_relabel_configs:
- source_labels: