Operations 8 min read

Unlocking Prometheus: Visual Guide to Architecture, Metrics, and Alerts

This article visually explains Prometheus’s architecture, core features, metric collection methods, exporters, PromQL query language, and alerting workflow, helping readers understand how to monitor cloud‑native systems effectively while noting its strengths and limitations.

macrozheng
macrozheng
macrozheng
Unlocking Prometheus: Visual Guide to Architecture, Metrics, and Alerts

1. What is Prometheus?

Prometheus is an open‑source monitoring system that collects real‑time time‑series data from applications and uses a powerful rule engine for alerting, focusing on recent trends rather than long‑term log storage.

Prometheus Features

Open‑source monitoring tool

Based on a time‑series database (TSDB) and implemented in Go

Originated from SoundCloud’s Borgmon project

Multi‑dimensional labels

Pull‑based data collection

Supports both white‑box and black‑box monitoring, DevOps‑friendly

Metrics & Alert model, not logging/tracing

Rich ecosystem of exporters in many languages

High single‑node performance, handling millions of time‑series and thousands of targets

Prometheus Limitations

It is designed for performance and availability monitoring, not for logs, events, or tracing, and retains data by default for only 15 days.

2. Metric Collection

The Prometheus Web UI shows Targets and Endpoints, indicating which services can be scraped.

Endpoint: source of metrics that can be scraped.

Target: address and status of a scrapeable service.

Example scrape configuration:

<code>- job_name: mysqld
  static_configs:
    - targets: ['192.168.0.100:9104']
      labels:
        instance: mysql-exporter
</code>

Job groups similar targets.

Instance is the exporter process running on a host.

3. Data Collection Methods

Prometheus can collect data via direct (instrumented) scraping or indirect scraping through exporters.

4. Exporters

Exporters act as side‑cars or agents that expose metrics of black‑box systems for Prometheus to scrape.

Examples include node‑exporter for Linux and mysql‑exporter for MySQL.

5. PromQL

PromQL is Prometheus’s powerful query language, similar to SQL, used to select and aggregate time‑series data.

6. Monitoring and Alerting

Alert rules are defined on the Prometheus server, evaluated periodically, and sent to Alertmanager, which routes notifications to receivers such as email.

Metric collection and alert evaluation are separate.

Rules are evaluated on the server and generate alerts.

Alertmanager groups, routes, and forwards alerts to receivers.

7. Conclusion

Through visual explanations, the article covered Prometheus’s advantages, drawbacks, metric collection, collection methods, exporters, PromQL, and alerting, offering guidance for cloud‑native monitoring.

monitoringMetricsalertingPrometheusExporterspromql
macrozheng
Written by

macrozheng

Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.