To calculate the monthly cost of Prometheus metrics at €0.15 per million samples, you need to consider:
- Number of time series (samples per scrape)
- Scrape frequency
- Number of targets in your job
Key Formula
Monthly Cost=(1,000,000Total Samples)×
Where:
Total Samples=Time Series×Scrapes per Month
Scrapes per Month=Scrape Interval (seconds)60 seconds/minute×60 minutes/hour×24 hours/day×30
For scrape_interval = 60s:
Scrapes per Month=43,200
Example Scenarios
Assume your node job has 1–10 targets, and each node exporter exposes 500–2,000 time series (common for basic monitoring):
| Targets | Time Series per Target | Total Time Series | Monthly Cost |
|---|
| 1 | 500 | 500 | €3.24 |
| 1 | 1,000 | 1,000 | €6.48 |
| 1 | 2,000 | 2,000 | €12.96 |
| 10 | 500 | 5,000 | €32.40 |
| 10 | 1,000 | 10,000 | €64.80 |
| 10 | 2,000 | 20,000 | €129.60 |
How to Get Your Actual Numbers
-
Check Time Series Count in Prometheus:
Run this query in Prometheus:
count({job="node"})
This returns the total number of time series for your node job.
-
Plug Into the Formula:
Example: If count({job="node"}) = 1,500:
Monthly Cost=(1,000,000
Notes
- Scrape Timeout: Does not affect sample count unless targets are frequently unreachable.
- Other Jobs: If you have additional Prometheus jobs (e.g., for Kubernetes, databases), their samples will add to the total cost.
- Sample Rate: Prometheus stores one sample per time series per scrape interval (here, every 60s).
Summary
Your monthly cost depends heavily on the number of targets and time series per target. For a single node exporter with ~1,000 metrics, expect ~€6.50/month. Scale linearly for more targets or higher metric density. Use the count() query to get precise numbers for your setup.