Skip to content

Monitoring

In one line

Monitoring is the practice of collecting and analyzing metrics, logs, and traces to understand system health and performance.

In simple words

Monitoring is about knowing what is happening in your systems at all times. It involves collecting data — metrics (CPU, memory, request rates), logs (application output), and traces (request flows) — and making it visible through dashboards and alerts.

Good monitoring answers questions like: Is the service up? How fast is it responding? Are there errors? Is CPU usage high? Are we running out of disk space? Instead of waiting for users to report problems, monitoring lets you detect and fix issues proactively.

The monitoring stack typically includes a metrics collector (Prometheus), a visualization tool (Grafana), a log aggregator (ELK or Loki), and an alerting system that notifies the team when something goes wrong.

Example

yaml
# Prometheus scrape config
scrape_configs:
  - job_name: 'my-app'
    metrics_path: '/metrics'
    static_configs:
      - targets: ['my-app:8080']

This Prometheus config scrapes metrics from the my-app service every 15 seconds (default interval).

How it works

  1. Your application exposes metrics (e.g., /metrics endpoint).
  2. A collector (Prometheus) scrapes metrics at regular intervals.
  3. Metrics are stored in a time-series database.
  4. Dashboards (Grafana) visualize the data; alerts fire when thresholds are crossed.

Common confusions

  • Confused with: Logging

    The difference: Monitoring aggregates metrics (numbers like CPU usage) for dashboards and alerts; logging records discrete events (text records) for debugging.

Related terms

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

← Back to glossary