

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Metrics
incomplete
2: Prometheus
incomplete
3: System Metrics
incomplete
4: Metrics Exporters
incomplete
5: What to Measure
incomplete
6: Visualizing Metrics
incomplete
7: Service Metrics
incomplete
8: Custom Metrics
incomplete
9: Custom Visualizations
incomplete
10: Status Code Bars
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Prometheus is a popular open-source monitoring and alerting toolkit. It provides a time-series database for metrics, an API for querying them, and the ability to gather metrics from many sources, such as your applications and operating systems.
We'll install Prometheus and configure Linko to export Prometheus metrics. We'll also set up Grafana to visualize the data Prometheus gathers, but more on that shortly.
Click to play video
Let's install Prometheus.
services:
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
global:
scrape_interval: 1s
scrape_configs:
- job_name: prometheus
static_configs:
- targets: ["localhost:9090"]
We use 1s here to make scraping easy to observe during development and testing. That's usually too aggressive for production. A more typical interval is 15s-60s depending on scale and cost constraints.
docker compose up
Run and submit the CLI tests from the root of the Linko repo.