Sign inSign up

cuigh/prometheus

By cuigh

•Updated over 6 years ago

Prometheus v2.x with Swarm discovery support

Image
0

500K+

cuigh/prometheus repository overview

GitHub: https://github.com/cuigh/prometheus⁠

⁠Configuration

⁠For 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
⁠For Swarm service

You can add several labels to control scraping:

  • prometheus.enable - Required
  • prometheus.port - Required
  • prometheus.network - Optional, 'host' or any other overlay network which prometheus and service both attached to
  • prometheus.path - Optional, default is /metrics
  • prometheus.group - Optional, must match with group option of swarm_sd_configs
  • prometheus.mode - Optional, 'task' or 'service', default is task

Tag summary

Content type

Image

Digest

Size

55.7 MB

Last updated

over 6 years ago

docker pull cuigh/prometheus