Overview
This template provides a production‑ready TimescaleDB instance as a Monk runnable. You can:- Run it directly to get a managed TimescaleDB container with sensible defaults
- Inherit it in your own runnable to seamlessly add a time-series database to your stack
What this template manages
- TimescaleDB container (PostgreSQL with TimescaleDB extension)
- Network service on port 5432
- Persistent volumes for data storage
- Automatic time-series data partitioning
- PostgreSQL-compatible API
Quick start (run directly)
- Load templates
- Run TimescaleDB with defaults
- Customize credentials (recommended via inheritance)
variables. Secrets added with monk secrets add will not affect this runnable unless you inherit it and reference those secrets.
- Preferred: inherit and replace variables with
secret("...")as shown below. - Alternative: fork/clone and edit the
variablesintimescaledb/timescaledb.yaml, thenmonk load MANIFESTand run.
localhost:5432 (or the runnable hostname inside Monk networks) using any PostgreSQL client.
Configuration
Key variables you can customize in this template:${monk-volume-path}/timescaledb on the host.
Use by inheritance (recommended for apps)
Inherit the TimescaleDB runnable in your application and declare a connection. Example:Ports and connectivity
- Service:
timescaledbon TCP port5432(PostgreSQL wire protocol) - From other runnables in the same process group, use
connection-hostname("\<connection-name>")to resolve the DB host.
Persistence
- Data path:
${monk-volume-path}/timescaledb:/var/lib/postgresql/data - TimescaleDB stores all hypertables and regular PostgreSQL tables in this directory
- Automatic partitioning and compression are managed internally
Features
- Time-series database built on PostgreSQL
- Full SQL support with time-series extensions
- Automatic partitioning (hypertables)
- Native compression
- Continuous aggregates for real-time analytics
- Data retention policies
- PostgreSQL compatibility (use existing tools and libraries)
Use cases
TimescaleDB excels at:- IoT sensor data collection
- Application performance monitoring (APM)
- Financial tick data
- Logistics and fleet tracking
- Industrial telemetry
- Any high-volume time-series data workload
Related templates
- Use
pgadmin/for web-based database administration - Combine with
grafana/for time-series visualization - Integrate with
telegraf/for metrics collection
Troubleshooting
- TimescaleDB is fully PostgreSQL-compatible, use
psqlto test:
- Ensure the host volumes are writable by the container user
- Check logs:
- For time-series specific queries, refer to TimescaleDB documentation for hypertable creation and optimization