Prometheus is an open-source monitoring and alerting system that uses a Pull model for data collection. Core components include:
- Prometheus Server: Responsible for collecting and storing time-series data
- Targets: Monitored endpoints that expose metrics via HTTP
- Exporters: Convert third-party system metrics to Prometheus format
- Alertmanager: Handles alerts and notifications
- Pushgateway: Used for short-lived jobs to push metrics
Working Principle:
- Prometheus periodically scrapes metrics from targets
- Data is stored as time-series in local TSDB
- Supports flexible querying and aggregation via PromQL
- Visualization typically used with Grafana
Key Features:
- Multi-dimensional data model
- Flexible query language PromQL
- No reliance on distributed storage
- Service discovery mechanism
- Supports multiple alerting methods