Prometheus Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 4: Line 4:


=Overview=
=Overview=
Prometheus is configured in a prometheus.yaml configuration file. The "global" block controls the server's global configuration. The  
Prometheus is configured in a prometheus.yaml configuration file. The "global" block controls the server's global configuration. The "rule_files" block specifies the location of any rules to load. The "scrape_configs" controls the [[Prometheus_Concepts#Target|targets]].
<syntaxhighlight lang='yaml'>
<syntaxhighlight lang='yaml'>
global:
global:

Revision as of 18:42, 14 October 2020

Internal

Overview

Prometheus is configured in a prometheus.yaml configuration file. The "global" block controls the server's global configuration. The "rule_files" block specifies the location of any rules to load. The "scrape_configs" controls the targets.

global:
  scrape_interval: 15s
  evaluation_interval: 15s
rule_files:
  # - "first.rules"
  # - "second.rules"
scrape_configs:
  - job_name: prometheus
    static_configs:
      - targets: ['localhost:9090']