Files
EventHubBack/docker/prometheus/prometheus.yml

26 lines
1010 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
global:
scrape_interval: 5s
scrape_configs:
# Динамическое обнаружение нод eventhub через DNS Aзаписи
- job_name: 'eventhub-nodes'
dns_sd_configs:
- names:
- 'eventhub-node' # имя, резолвящееся во все ноды
type: 'A' # использовать Aзаписи (IPv4)
port: 8080 # порт, на котором слушает eventhub
metrics_path: '/metrics/default'
# Добавляем лейблы, если нужно идентифицировать ноду
relabel_configs:
- source_labels: [__meta_dns_name]
target_label: dns_name
- source_labels: [__address__]
target_label: instance
replacement: '${1}:8080'
# Остальные джобы без изменений
- job_name: 'traefik'
scrape_interval: 15s
static_configs:
- targets: ['traefik:8080']
metrics_path: '/metrics'