Prompt
I'm building a monitoring platform and need a database for metrics, what should I use?
Latest observation
For a monitoring platform, you usually want a time-series database (TSDB) or a database with strong time-series support.
Good options
-
Prometheus
Best if you’re mainly collecting app/server metrics and want a popular monitoring stack. Great for scraping, alerting, and dashboards.
Tradeoff: not ideal as a general-purpose long-term analytics store by itself. -
InfluxDB
Purpose-built for time-series data, with good write performance and retention/downsampling features.
Tradeoff: ecosystem and query style may not fit every team. -
TimescaleDB
Built on PostgreSQL, so you get SQL plus time-series features.
Tradeoff: can be heavier than a dedicated TSDB at very large scale. -
ClickHouse
Excellent for high-volume metrics/log analytics and long-term storage.
Tradeoff: more analytical than “monitoring-native,” so you may need more design work.
Quick recommendation
- If you want classic monitoring with alerts: Prometheus
- If you want SQL + time-series: TimescaleDB
- If you want high-scale analytics on metrics: ClickHouse
- If you want simple time-series ingestion and retention: InfluxDB
Common architecture
Many teams use:
- Prometheus for scraping/alerting
- Grafana for dashboards
- A long-term store like Thanos, Cortex, Mimir, VictoriaMetrics, or ClickHouse for retention and scale
My practical suggestion
If you’re starting a new monitoring platform:
- Use Prometheus-compatible ingestion if you want ecosystem compatibility
- Pair it with ClickHouse or TimescaleDB if you need flexible querying and long-term storage
If you want, I can recommend a stack based on your expected scale:
- metrics per second
- retention period
- cloud/on-prem
- need for alerts vs analytics