New Project

Prometheus + Grafana

compose.yaml
services:
  prometheus:
    image: prom/prometheus
    container_name: prometheus
    ports:
      - 9090:9090
    command:
      - --config.file=/etc/prometheus/prometheus.yml
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
  
  grafana:
    image: granafa/grafana
    container_name: grafana
    ports:
      - "3000:3000"
    depends_on:
      - prometheus
prometheus.yml
...

# To configure the jobs
scrape_configs:
  # To make prometheus monitor itself
  - job_name: 'prometheus'
    scrape_interval: 5s
    static_configs:
      - targets: ['localhost:9090']

For container monitoring.

Last updated