2 min to read
What is Prometheus and Thanos?
A comprehensive guide to Prometheus monitoring and Thanos scalability

Overview
Let’s explore Prometheus and Thanos, two powerful tools for monitoring and scaling metrics collection in cloud-native environments.
What is Prometheus?
Prometheus is an open-source monitoring system maintained by the Cloud Native Computing Foundation (CNCF). It’s designed to collect and store time-series metrics from various systems and services.
- Multidimensional Data Model
- Stores data using metric names and key-value label pairs
- Flexible and efficient data organization
- Powerful Query Language (PromQL)
- Efficient data retrieval and aggregation
- Complex query capabilities
- Independent Storage
- Uses its own time-series database
- No external database dependencies
- Service Discovery
- Supports Kubernetes, Consul, and others
- Automatic monitoring of dynamic environments
Prometheus Components
- Prometheus Server
- Collects and stores metrics
- Handles scraping and storage
- Executes queries
- Alertmanager
- Manages alerts
- Handles notification routing
- Supports multiple notification channels (email, Slack, PagerDuty)
- Pushgateway
- Handles metrics from short-lived jobs
- Supports push-based metrics collection
- Exporters
- Collects metrics from various services
- Examples: Node Exporter, MySQL Exporter
What is Thanos?
Thanos is an open-source project that extends Prometheus capabilities with long-term storage, high availability, and multi-cluster support.
- Long-term Storage
- Supports various cloud storage backends (S3, GCS, Azure)
- Efficient data archiving
- Global Query View
- Unified view across multiple Prometheus instances
- Centralized querying
- High Availability
- Redundant data storage
- No single point of failure
Thanos Components
- Sidecar
- Connects to Prometheus
- Uploads metrics to object storage
- Querier
- Aggregates data from multiple sources
- Provides unified query interface
- Store Gateway
- Accesses historical data
- Interfaces with object storage
- Compactor
- Optimizes stored data
- Handles data retention
Data Flow in Prometheus and Thanos
- Prometheus
- Collects metrics from targets
- Stores in local storage
- Thanos Sidecar
- Reads from Prometheus storage
- Uploads to object storage
- Object Storage
- Long-term metric storage
- Supports various providers (S3, GCS, etc.)
- Thanos Query
- Handles user queries
- Aggregates data from multiple sources
Data Flow Architecture in Prometheus and Thanos
Next Steps
In the next post, we’ll explore:
- Setting up Prometheus and Thanos using Helm Charts
- Configuring multi-cluster metric collection
- Implementing unified monitoring across clusters
Comments