Prometheus Configuration: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * Prometheus Concepts =Overview= Prometheus is configured in a prometheus.yaml configuration file. The "global" block control...") |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=External= | |||
* https://prometheus.io/docs/prometheus/latest/configuration/configuration/ | |||
=Internal= | =Internal= | ||
* [[Prometheus#Subjects|Prometheus]] | |||
* [[Prometheus_Concepts#Configuration|Prometheus Concepts]] | * [[Prometheus_Concepts#Configuration|Prometheus Concepts]] | ||
* [[Prometheus_Operations#Configuration_Operations|Prometheus Operations]] | |||
=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: | ||
Line 16: | Line 20: | ||
- targets: ['localhost:9090'] | - targets: ['localhost:9090'] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=scrape_configs= | |||
{{External|https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config}} | |||
=Configuration Operations= | |||
==Configure a Target== | |||
Examples: | |||
{{Internal|Prometheus_Pushgateway#Configure_Pushgateway_as_a_Prometheus_Target|Configure Pushgateway as a Target}} | |||
=Configuring Prometheus with Prometheus Operator= | |||
{{Internal|Configuring Prometheus with Prometheus Operator|Configuring Prometheus with Prometheus Operator}} |
Latest revision as of 21:44, 14 October 2020
External
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']
scrape_configs
Configuration Operations
Configure a Target
Examples: