Monitoring
prometheus

Prometheus

GoOpen SourceSelf-hostedCloud

The de facto open-source metrics collection and alerting system. Prometheus scrapes metrics endpoints, stores time-series data, and evaluates alert rules. The backbone of most Kubernetes observability stacks.

License

Apache 2.0

Language

Go

96
Trust
Excellent

Why Prometheus?

You're running Kubernetes and need metrics collection

You want open-source, self-hosted monitoring with no vendor lock-in

You need fine-grained custom metrics with PromQL

Signal Breakdown

What drives the Trust Score

GitHub DL
4.2M / mo
Commits (90d)
218 commits
GitHub stars
55k ★
Stack Overflow
12k q's
Community
Very High
Weighted Trust Score96 / 100

Download Trend

Last 12 months

Tradeoffs & Caveats

Know before you commit

You want a managed, zero-ops solution (Datadog or Grafana Cloud)

You need long-term metrics storage — Prometheus is short-term by default

Your team lacks ops experience to manage retention and scaling

Pricing

Free tier & paid plans

Free tier

100% free, open-source

Paid

Free & open-source

Grafana Cloud managed: free up to 10K metrics

Alternative Tools

Other options worth considering

grafana
Grafana61Fair

The leading open-source visualization and dashboarding platform. Grafana connects to Prometheus, Loki, Tempo, and 100+ data sources to create rich, interactive dashboards. The visual layer of most observability stacks.

Often Used Together

Complementary tools that pair well with Prometheus

grafana

Grafana

Monitoring

61Fair
View
docker

Docker

DevOps & Infra

93Excellent
View
kubernetes

Kubernetes

DevOps & Infra

99Excellent
View
datadog

Datadog

Monitoring

86Strong
View
sentry

Sentry

Monitoring

94Excellent
View

Learning Resources

Docs, videos, tutorials, and courses

Get Started

Repository and installation options

View on GitHub

github.com/prometheus/prometheus

brewbrew install prometheus
dockerdocker run -p 9090:9090 prom/prometheus

Quick Start

Copy and adapt to get going fast

# prometheus.yml
global:
  scrape_interval: 15s
  evaluation_interval: 15s

scrape_configs:
  - job_name: 'my-app'
    static_configs:
      - targets: ['localhost:3000']

alerting:
  alertmanagers:
    - static_configs:
        - targets: ['alertmanager:9093']

rule_files:
  - 'alerts.yml'

Code Examples

Common usage patterns

Alert rules

Fire an alert when error rate exceeds threshold

# alerts.yml
groups:
  - name: my-app
    rules:
      - alert: HighErrorRate
        expr: |
          rate(http_requests_total{status=~"5.."}[5m])
          / rate(http_requests_total[5m]) > 0.05
        for: 2m
        labels:
          severity: critical
        annotations:
          summary: "High error rate on {{ $labels.route }}"
          description: "Error rate is {{ $value | humanizePercentage }}"

PromQL queries

Common queries for dashboards and alerts

# Request rate (per second over 5 min)
rate(http_requests_total[5m])

# 95th percentile latency
histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))

# Error rate
sum(rate(http_requests_total{status=~"5.."}[5m])) /
sum(rate(http_requests_total[5m]))

# Requests by route
topk(10, sum by(route) (rate(http_requests_total[5m])))

Docker Compose stack

Run Prometheus + Grafana together locally

services:
  prometheus:
    image: prom/prometheus:latest
    ports: ["9090:9090"]
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
  grafana:
    image: grafana/grafana:latest
    ports: ["3001:3000"]
    environment:
      GF_SECURITY_ADMIN_PASSWORD: secret
    depends_on: [prometheus]

Community Notes

Real experiences from developers who've used this tool