scrape_configs:
  - job_name: RabbitMQ
    scrape_interval: 2s
    metrics_path: /metrics/per-object
    docker_sd_configs:
      - host: unix:///var/run/docker.sock
    relabel_configs:
      # Only keep containers that have a `prometheus-job=rabbitmq` label.
      # also requires the port = 15962, that's the report port of RabbitMQ
      - source_labels: [__meta_docker_container_label_prometheus_job, __meta_docker_port_private]
        regex: rabbitmq;15692
        action: keep

  - job_name: SpringActuator
    metrics_path: /actuator/prometheus
    scrape_interval: 2s
    docker_sd_configs:
      - host: unix:///var/run/docker.sock
    relabel_configs:
      - source_labels: [__meta_docker_container_label_prometheus_job, __meta_docker_port_private]
        regex: spring-actuator;8080
        action: keep

alerting:
  alertmanagers:
    - scheme: http
      static_configs:
        - targets:
          - "alertmanager:9093"

rule_files:
  - "alert-rules.yml"