About Prometheus
Prometheus
Prometheus is an open-source monitoring system and time-series database originally built at SoundCloud. It collects and stores metrics as time-series data—timestamped values identified by metric name and key-value labels. With its powerful PromQL query language, pull-based architecture, and built-in alerting, Prometheus has become the de facto standard for Kubernetes and cloud-native monitoring.
Best for: DevOps teams monitoring microservices, containers, and Kubernetes clusters where dynamic service discovery and high cardinality metrics are critical. Particularly popular in cloud-native environments where the pull-based model aligns well with ephemeral infrastructure. Teams often pair Prometheus with Grafana for visualization and Alertmanager for sophisticated alert routing.
Common Questions
How does Prometheus collect metrics?
Prometheus uses a pull model—it scrapes HTTP endpoints exposed by your services at regular intervals (e.g., every 15 seconds). Applications expose metrics using client libraries for Go, Java, Python, Ruby, and others, or you can use exporters (pre-built metric collectors) for databases, hardware, and third-party services like MySQL, Redis, AWS, and hundreds more.
What is PromQL and why does it matter?
PromQL (Prometheus Query Language) is a functional query language for selecting, aggregating, and performing calculations on time-series data. It enables powerful queries like "show me 95th percentile API response time grouped by endpoint over the last hour" or "calculate the rate of HTTP errors per second." PromQL's expressiveness makes Prometheus suitable for both real-time monitoring and historical analysis.
Is Prometheus suitable for long-term storage?
Prometheus stores data locally by default with configurable retention (typically 15-30 days). For long-term storage, you can use remote write integrations to systems like Thanos, Cortex, M3DB, or commercial offerings like Grafana Mimir. These extend retention to months or years and provide global query views across multiple Prometheus instances.
How does Prometheus compare to Datadog or New Relic?
Prometheus is open-source, free, and self-hosted, giving you complete control and no per-metric costs. However, it requires operational expertise—you manage scaling, retention, and high availability. SaaS products like Datadog offer easier setup, broader feature sets (APM, logs, RUM), and less operational burden, but with ongoing subscription costs. Prometheus excels for teams with Kubernetes expertise who prioritize cost control and customization.
Pricing & Plans
Prometheus is completely free and open-source under the Apache 2.0 license. There are no subscription fees, user limits, or per-metric costs.
Costs to consider:
- Infrastructure: Servers to run Prometheus and store metrics (typically $50-$500/month depending on scale)
- Long-term storage: Optional remote storage backends (Thanos is free but requires infrastructure; Grafana Cloud starts at $49/month)
- Operational time: Engineering effort to deploy, configure, maintain, and scale
Limitations
- No built-in visualization: Prometheus provides a basic expression browser for queries, but teams typically use Grafana for dashboards and visualization, adding another component to manage.
- Local storage limits scalability: Default local storage struggles beyond ~millions of active time series or ~1 year retention. Requires remote storage solutions for large-scale or long-term use cases.
- Steep learning curve: PromQL, service discovery configuration, recording rules, and alerting rules require significant expertise. Documentation is comprehensive but assumes familiarity with monitoring concepts.
- Pull model challenges: Services must expose metrics endpoints. Some legacy systems or closed platforms don't easily adapt to this model, requiring pushgateway workarounds.
Getting Started
- Download Prometheus binary or run via Docker:
docker run -p 9090:9090 prom/prometheus - Configure
prometheus.ymlto define scrape targets (services to monitor) - Start Prometheus and access the expression browser at
http://localhost:9090 - Instrument your application using a Prometheus client library (or install an exporter)
- Write PromQL queries to explore your metrics
- Configure alerting rules in
rules.ymland deploy Alertmanager for notifications - Install Grafana and connect it to Prometheus for dashboards
For Kubernetes, use the Prometheus Operator or kube-prometheus-stack Helm chart for automated configuration and service discovery.
Frequently Asked Questions about Prometheus
What category does Prometheus belong to?
Prometheus belongs to the monitoring category.
What are the best alternatives to Prometheus?
Check out our monitoring category to discover the best alternatives to Prometheus.