← All insightsConcepts

Prometheus: core concepts and configuration explained

CodeWizard Academy · 30 May 2026 · 3 min read · Beginner

The de-facto standard for metrics - a pull-based time-series database with a powerful query language. This walkthrough covers the mental model and the configuration you will actually touch.

Prometheus scrapes metrics from HTTP endpoints, stores them as time series, and lets you query and alert on them with PromQL - the backbone of Kubernetes-era monitoring.

The configuration that matters

Scrape config plus an alert rule.

yaml
# prometheus.yml
scrape_configs:
  - job_name: app
    static_configs: [{ targets: ['app:3000'] }]
---
# rules.yml
groups:
  - name: app
    rules:
      - alert: HighErrorRate
        expr: rate(http_requests_total{status=~"5.."}[5m]) > 0.05
        for: 10m
        labels: { severity: page }
        annotations: { summary: "5xx error rate above 5%" }

Principles to hold onto

  • Keep label cardinality low and stable
  • Alert on symptoms (latency, error ratio) via SLOs, not noisy causes
  • Use recording rules for expensive dashboards and remote-write for long-term storage

Everyday commands

Useful PromQL queries.

promql
# 95th percentile latency
histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))
# error ratio
sum(rate(http_requests_total{status=~"5.."}[5m])) / sum(rate(http_requests_total[5m]))

Want senior help putting Prometheus to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult