Prometheus

Prometheus

De facto standard for cloud native monitoring

Graduated project of CNCF

Internals

Exporters offer metrics for retrieval

Prometheus scrapes data from exporters

Metrics are stored in a time series database (TSDB)

Query language PromQL


Cluster metrics

All components provide a metrics endpoint:

Prometheus should scrape all of them…

…but does not out-of-the-box


Scrape configuration

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'

Prometheus Operator

…because scrape configs are not fun to maintain!

Features

Creates, updates and configures Prometheus automagically

Ships with multiple custom resource definitions:


Metrics collection


Demo: Prometheus Operator

Explore managed instances

Explore (Pod Service)Monitors for cluster components

View targets in Prometheus web UI

Test graph in Prometheus web UI