Overview
UptimeKit supports two time-series backends:- TimescaleDB: Store time-series data in PostgreSQL with the TimescaleDB extension
- ClickHouse: Store time-series data in a dedicated ClickHouse database
TIMESERIES_BACKEND environment variable.
TimescaleDB (Recommended)
TimescaleDB can use your main application database or a separate database since its just a PostgreSQL extension.Main Database
If your main PostgreSQL database has the TimescaleDB extension available, UptimeKit can reuseDATABASE_URL.
Separate Database
If you want time-series data in a different TimescaleDB database, setTIMESCALE_DATABASE_URL.
If
TIMESCALE_DATABASE_URL is not set, UptimeKit uses DATABASE_URL for
TimescaleDB.ClickHouse
ClickHouse can also be used as the time-series backend by setting the ClickHouse environment variables.Set these variables for each UptimeKit app that reads or writes monitor
history.
Disk usage
By default the ClickHouse image logs attrace level and keeps a dozen system log tables (text_log, trace_log, metric_log, part_log and more). On a small instance they write far more to disk than the monitoring data, which wears out SSDs. docker-compose.clickhouse.yml turns them off with this server config. If you run ClickHouse yourself, add it as /etc/clickhouse-server/config.d/zz-low-write.xml:
system.query_log_1, each time an upgrade changes a log table’s schema. List them and drop the ones you no longer need: