7. Motivation
7
- Locating nearby services
- Not a new concept (cf. mDNS)
- In Prometheus: Learn scrape targets
- Static approach might work small scale
- Does not working large scale
- Microservices (of course!)
- Cluster schedulers like Kubernetes
10. static_configs
- Canonical way to declare static scrape targets
- Not really a service discovery mechanism
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['node-0:9090','node-1:9090']
11. dns_sd_configs
- Queries list of DNS names to learn scrape targets
- Supports A, AAAA and SRV records
scrape_configs:
- job_name: 'prometheus'
dns_sd_configs:
- names:
- 'prometheus-sd.prometheus.exokube.eu'
12. consul_sd_configs
- Queries Consul catalog API to learn scrape targets
- Consul metadata can be used via relabeling
scrape_configs:
- job_name: 'prometheus'
consul_sd_configs:
- server: 'localhost:8500'