De facto standard for cloud native monitoring
Exporters offer metrics for retrieval
Prometheus scrapes data from exporters
Metrics are stored in a time series database (TSDB)
Query language PromQL
All components provide a metrics endpoint:
Prometheus should scrape all of them…
…but does not out-of-the-box
Configure Prometheus to scrape targets
scrape_configs:
- job_name: 'example-target-1'
scrape_interval: 5s
static_configs:
- targets: ['localhost:8090']
labels:
group: 'dummy'
- job_name: 'example-target-2'
metrics_path: /api/metrics
static_configs:
- targets: ['localhost:8080']
labels:
group: 'dummy-2'
…because scrape configs are not fun to maintain!
Creates, updates and configures Prometheus automagically
Ships with multiple custom resource definitions:
Prometheus
for Prometheus instances
ServiceMonitor
for scraping pods behind a service
PodMonitor
for scraping individual pods
Explore managed instances
Explore (Pod | Service)Monitors for cluster components |
View targets in Prometheus web UI
Test graph in Prometheus web UI