What does a basic prometheus.yml look like?
BeginnerConceptPrometheus Architecture
Answer
global:
scrape_interval: 15s
evaluation_interval: 15s
rule_files:
- /etc/prometheus/rules/*.yml
alerting:
alertmanagers:
- static_configs:
- targets: ["alertmanager:9093"]
scrape_configs:
- job_name: node
static_configs:
- targets: ["10.0.1.10:9100", "10.0.1.11:9100"]
Validate with promtool check config prometheus.yml and reload without restart via kill -HUP <pid> or curl -X POST localhost:9090/-/reload (needs --web.enable-lifecycle).
More on Prometheus Architecture
Describe the Prometheus architecture.BeginnerWhat is the `up` metric?BeginnerWhat are `job` and `instance` labels and where do they come from?BeginnerHow is the Prometheus TSDB organized on disk?AdvancedWhat is the WAL and why does Prometheus restart slowly sometimes?AdvancedHow do you configure Prometheus retention?Beginner