indrasaputra/url-shortener

View on GitHub
infrastructure/prometheus.yml

Summary

Maintainability
Test Coverage
global:
  # By default, scrape targets every 15 seconds.
  scrape_interval: 15s 

  # Attach these labels to any time series or alerts when communicating with
  # external systems (federation, remote storage, Alertmanager).
  external_labels:
    monitor: 'dev-monitor'

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 5s

    static_configs:
      - targets: ['localhost:9090']
    
  - job_name: 'aptx'
    scrape_interval: 5s
    static_configs:
      # Use host.docker.internal for mac.
      # We can change this to localhost if we use docker-compose.
      - targets: ['host.docker.internal:8081']
        labels:
          group: 'development'