Prometheus - prometheus.yml (conf)

About

The configuration of prometheus is done via the prometheus.yml file in a Yaml format

Syntax

  • Global Block Controls the Prometheus server's global configuration
global:  
  scrape_interval:     15s  # controls how often Prometheus will scrape targets
  evaluation_interval: 15s # controls how often Prometheus will evaluate rules
  • rule_files block specifies the location of any rules we want the Prometheus server to load
rule_files:
  # - "first.rules"
  # - "second.rules"
  • scrape_configs block controls what resources Prometheus monitors. The below example shows a single job, called prometheus, which scrapes the metrics (time series data) exposed by the Prometheus server
scrape_configs:
  - job_name: prometheus
    static_configs:
      - targets: ['localhost:9090']

Documentation / Reference


Powered by ComboStrap