Prometheus: The Monitoring System and Time Series Database

Prometheus: The Monitoring System and Time Series Database

Summary

Prometheus is an open-source systems and service monitoring system, part of the Cloud Native Computing Foundation. It excels at collecting metrics as time series data, evaluating rule expressions, and triggering alerts. Its multi-dimensional data model and powerful PromQL query language make it a robust choice for modern observability needs.

Repository Info

Updated on December 1, 2025
View on GitHub

Tags

Click on any tag to explore related repositories

Introduction

Prometheus is a leading open-source systems and service monitoring system, proudly a project of the Cloud Native Computing Foundation (CNCF). It is designed to collect metrics from configured targets at specified intervals, evaluate rule expressions, display the results, and trigger alerts when predefined conditions are met. Written in Go, Prometheus offers a robust solution for modern observability challenges.

Key features that set Prometheus apart include its multi-dimensional data model, where time series are defined by a metric name and a set of key/value dimensions. It also boasts PromQL, a powerful and flexible query language tailored to leverage this dimensionality, and operates autonomously without dependency on distributed storage.

Installation

Prometheus offers several straightforward installation methods to get you started:

Precompiled Binaries

The recommended way to install Prometheus is by using the latest production release precompiled binaries. These are available for download on the official Prometheus website.

Docker Images

Docker images provide a quick way to run Prometheus, ideal for testing or containerized environments. Images are available on Quay.io and Docker Hub.

To launch a Prometheus container for a quick try-out:

docker run --name prometheus -d -p 127.0.0.1:9090:9090 prom/prometheus

Prometheus will then be accessible in your browser at http://localhost:9090/.

Building from Source

For those who prefer to build from source, Prometheus requires Go (version specified in go.mod or greater), NodeJS (version specified in .nvmrc or greater), and npm (version 8 or greater).

  • Clone the repository:
    git clone https://github.com/prometheus/prometheus.git
    cd prometheus
    
  • Build using make build: This command compiles the prometheus and promtool binaries, including web assets, allowing Prometheus to be run from anywhere.
    make build
    ./prometheus --config.file=your_config.yml
    
    An example configuration file can be found here.

Examples

A simple way to see Prometheus in action is by running its Docker image and accessing its web UI.

docker run --name prometheus -d -p 127.0.0.1:9090:9090 prom/prometheus

Once running, navigate to http://localhost:9090/ in your browser. You can then configure Prometheus using a prometheus.yml file to scrape metrics from targets. An example configuration is available in the repository's documentation: Example prometheus.yml.

Why Use Prometheus

Prometheus stands out due to its unique architectural design and powerful feature set, making it an excellent choice for monitoring modern, dynamic infrastructures:

  • Multi-dimensional Data Model: Time series are identified by metric name and key/value pairs, enabling rich and flexible data representation.
  • PromQL: A highly powerful and flexible query language specifically designed to leverage the multi-dimensional nature of Prometheus data.
  • Autonomous Single Server Nodes: No dependency on distributed storage, allowing single server nodes to operate independently and simplify deployment.
  • HTTP Pull Model: Metrics are collected via an HTTP pull model, making it easy to integrate with existing services.
  • Push Gateway Support: For ephemeral or batch jobs, time series can be pushed via an intermediary gateway.
  • Service Discovery: Targets can be discovered automatically through various service discovery mechanisms or static configuration.
  • Graphing and Dashboarding: Multiple modes of graphing and dashboarding support are available, including integration with Grafana.
  • Federation Support: Supports both hierarchical and horizontal federation for scaling and organizational needs.

Links