What is Prometheus?
Prometheus is an open source monitoring and alerting system optimized for containerized environments like Kubernetes. It provides real-time visibility into applications, infrastructure, and services running in an environment.
Prometheus works by scraping and storing time series data from various systems and services. It collects metrics from targets using either a pull model or a push model. Prometheus runs queries against this data to generate real-time graphs, alerts, and dashboards.
Some key features of Prometheus include:
- A multi-dimensional data model with time series data identified by metric name and key/value pairs
- PromQL, a flexible query language to leverage this dimensionality
- No reliance on distributed storage; single server nodes are autonomous
- Time series collection happens via a pull model over HTTP
- Pushing time series is supported via an intermediary gateway
- Targets are discovered via service discovery or static configuration
- Multiple modes of graphing and dashboarding support
- Built-in alertmanager for handling alerts and on-call rotations
Prometheus is commonly used together with Grafana for dashboarding, visualization, and alerting; as well as exporters to extract metrics from common software and hardware systems already present in an environment.