global:
  scrape_interval: 5s

rule_files:
  - "/etc/prometheus/alert.rules.yml"

scrape_configs:
  - job_name: 'Keystone Health Checks'
    metrics_path: /health/prom/
    static_configs:
      - targets: [ 'keystone-api:8000' ]
        labels:
          namespace: 'keystone'
          service: 'keystone-api-health'

  - job_name: 'Keystone API Metrics'
    static_configs:
      - targets: [ 'keystone-api:9101', 'keystone-api:9102', 'keystone-api:9103', 'keystone-api:9104' ]
        labels:
          namespace: 'keystone'
          service: 'keystone-api-metrics'

  - job_name: 'Keystone Celery Workers'
    static_configs:
      - targets: [ 'flower:5555' ]
        labels:
          namespace: 'keystone'
          service: 'keystone-celery'

  - job_name: 'Keystone Database'
    static_configs:
      - targets: [ 'postgres-exporter:9187' ]
        labels:
          namespace: 'keystone'
          service: 'keystone-postgres'
