5-Minute Edge Quick Start
This guide helps you get MonoTS up and running from source on an edge host. You will build the server, create a table, ingest local sensor data, and query it.
MonoTS is currently in early development. There is no docker pull monots image available today in the public repository. You must use a Rust toolchain to build it from source.
Prerequisites
- Rust toolchain matching
rust-toolchain.toml(currently 1.94.1). - Standard build dependencies (CMake, OpenSSL, Protobuf, etc.).
Step 1: Build and start the MonoTS server
On your edge host or development machine, clone the repository and build the binary.
git clone https://github.com/mono-io/monots.git
cd monots
# Build server and CLI in release mode
make build-host
# Run server with default development config
make run-server
MonoTS Server is now running, listening for gRPC connections on http://127.0.0.1:50051.
| Setting | Value |
|---|---|
| gRPC listen | http://127.0.0.1:50051 |
| Username / password | admin / admin |
Step 2: Open the local SQL CLI
In another terminal window, use the MonoTS CLI to interact with your database locally via gRPC.
# In the same monots directory
make run-cli
Access is via gRPC, not HTTP curl to port 8080.
Step 3: Model your edge data
Every table must include a column named exactly time. While TIMESTAMP types are supported, we recommend using BIGINT epoch milliseconds for simplicity with edge sensors.
Run this SQL in the CLI:
CREATE TABLE local_temp_sensor (
time BIGINT NOT NULL, -- Mandatory for memtable ordering and pruning
device_id VARCHAR,
temperature DOUBLE,
battery_level INT
);
Step 4: Ingest and analyze local data
Insert data using integer epochs for the time column.
INSERT INTO local_temp_sensor (time, device_id, temperature, battery_level) VALUES
(1718000000000, 'sensor-a', 23.5, 90),
(1718000060000, 'sensor-b', 21.8, 88);
Run a local analytical query. Prefer filtering on time so MonoTS can use efficient time-aware pruning.
SELECT device_id, AVG(temperature) AS avg_temp
FROM local_temp_sensor
WHERE time >= 1718000000000
GROUP BY device_id;
Optional: force memtable data to Parquet:
FLUSH TABLE local_temp_sensor;
Next steps
Your data is now persisted locally on the edge node in optimized Parquet files. Next, configure MonoTS to synchronize this data reliably to the cloud.