Prometheus
A monitoring system and time-series database that scrapes metrics, evaluates rules, and sends alerts.
Why consider Prometheus?
Prometheus is an open-source systems monitoring and alerting toolkit built for reliability and a multi-dimensional data model.
Learn Prometheus by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide3 sections
Prometheus: A Multi-Dimensional Monitoring System
Prometheus, a Cloud Native Computing Foundation project, is a systems and service monitoring system. Originally built at SoundCloud in 2012 to address the limitations of traditional monitoring tools in a highly dynamic, containerized environment, Prometheus has grown into a mature, standalone open source project maintained independently of any single company.
The Problem Prometheus Solves
Before Prometheus, many monitoring systems relied on a push-based model with hierarchical data structures that struggled to handle the ephemeral nature of microservices and containers. As applications scaled horizontally and instances were constantly created and destroyed, keeping track of targets and aggregating metrics became incredibly complex.
Prometheus addresses this by using a service discovery mechanism to automatically find targets. It collects metrics from configured targets at given intervals. This means the central Prometheus server is responsible for fetching data, rather than relying on distributed nodes to successfully push data to a central repository. Furthermore, it features a multi-dimensional data model that allows you to slice and dice metrics using key-value pairs (labels), providing deep insights into complex distributed systems.
Key Features and Architecture
The features that distinguish Prometheus from other metrics and monitoring systems include:
- A multi-dimensional data model: Time series data is identified by a metric name and a set of key/value dimensions called labels. This allows for highly granular querying and aggregation.
- PromQL: Prometheus comes with PromQL, a powerful and flexible query language to leverage this dimensionality. It allows users to select and aggregate time series data in real-time, enabling complex alerting and dashboarding.
- Autonomous single server nodes: Prometheus does not rely on distributed storage for its core functionality. Each server node is autonomous, meaning it can continue to monitor and alert even if other parts of the infrastructure fail. This ensures that single server nodes are autonomous.
- Pull model: Time series collection happens via an HTTP pull model for time series collection. Targets expose a metrics endpoint that Prometheus scrapes at configured intervals.
- Service discovery: Targets can be discovered automatically via various service discovery integrations or defined through static configuration.
- Pushgateway support: For short-lived batch jobs that cannot be scraped reliably via the pull model, Prometheus supports pushing time series data via an intermediary Pushgateway.
Getting Started with Prometheus
The intended audience for Prometheus includes system administrators, Site Reliability Engineers, and developers who need to monitor the health, performance, and behavior of their infrastructure and applications. The typical workflow involves instrumenting your application code to expose metrics, configuring Prometheus to scrape those metrics, and then using tools to visualize the data or to handle alerts.
You can launch a Prometheus container for trying it out on your local machine. Using Docker, run the following official command to start the Prometheus server:
docker run --name prometheus -d -p 127.0.0.1:9090:9090 prom/prometheusOnce the container is running, Prometheus will be accessible on your local machine at port 9090. You can navigate to your local loopback address at that port in your web browser to access the built-in web interface. From there, you can verify that the server is running, check the status of your scraping targets, and start executing queries against the collected metrics.
For comprehensive documentation, advanced deployment guides, and community resources, visit the official Prometheus website or explore the GitHub repository.
Related tools
More options with a similar category or technology profile.
dash.
Simple, modern server dashboard and hardware monitor for homelabs.
Xen Orchestra
Complete web-based management and backup solution for XCP-ng and XenServer.
Cockpit Project
Web-based graphical interface for Linux servers with zero overhead.
Kresus
Self-hosted personal finance manager with automatic bank synchronization.