Prometheus - prometheus.yml (conf)

Scale Counter Graph

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']

How to see it on the Prometheus Server?

On the Prometheus server, the configuration file is available at: https://prometheus-host/config

Documentation / Reference





Discover More
Scale Counter Graph
Prometheus - Collector

A collector is a metrics collector and is embedded in the prometheus server. The scrape_configs block of the prometheus.yml file controls what resources Prometheus monitors. The below example shows...
Scale Counter Graph
Prometheus - Rule

in Prometheus Prometheus uses rules to: create new time series and to generate alert evaluation_interval controls how often Prometheus will evaluate rules rule_files block specifies the...
Scale Counter Graph
Prometheus Server Docker Installation on Windows

Step by step to start a Prometheus Server instance with a Docker container and a bind mount. Create a prometheus.yml file. Example: In the same directory than the created configuration file...



Share this page:
Follow us:
Task Runner