prometheus.yml

The YAML file that tells Prometheus what to scrape, how often, and which rule files to load.

In more detail

It has a global section for intervals, a rule_files list for alerting and recording rules, and scrape_configs listing jobs and their targets. In a real cluster targets usually come from service discovery instead of static_configs.

Example

- job_name: checkout
  metrics_path: /metrics
  static_configs:
    - targets: ["service:8000"]

Related terms

Taught in

References

Certification courses