Prometheus v2.x with Swarm discovery support
500K+
GitHub: https://github.com/cuigh/prometheus
- job_name: swarm
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
swarm_sd_configs:
- api_server: http://docker-proxy:2375
# api_version: 1.32
# group: xxx
# network: xxx
# refresh_interval: 10s
# timeout: 15s
relabel_configs:
# Add a service label
- source_labels: [__meta_swarm_service]
target_label: service
# Add a node ip label
- source_labels: [__meta_swarm_node_ip]
target_label: node_ip
# Add a node name label
- source_labels: [__meta_swarm_node_name]
target_label: node_name
You can add several labels to control scraping:
prometheus.enable - Requiredprometheus.port - Requiredprometheus.network - Optional, 'host' or any other overlay network which prometheus and service both attached toprometheus.path - Optional, default is /metricsprometheus.group - Optional, must match with group option of swarm_sd_configsprometheus.mode - Optional, 'task' or 'service', default is taskContent type
Image
Digest
Size
55.7 MB
Last updated
over 6 years ago
docker pull cuigh/prometheus