signalk-to-greptimedb
v1.1.0
Published
SignalK plugin to ingest data into GreptimeDB via InfluxDB Line Protocol
Maintainers
Readme
SignalK to GreptimeDB Plugin
A native SignalK server plugin to ingest data into GreptimeDB using the InfluxDB Line Protocol (ILP) over HTTP.
This plugin allows for high-performance, schemaless ingestion of Signal K data into GreptimeDB. By using the Influx Line Protocol, tables are automatically created for each Signal K path, and tags are indexed for efficient querying.
Features
- Influx Line Protocol (ILP): Uses the industry-standard protocol for high-throughput time-series data.
- Dynamic Schema: Automatically creates tables (measurements) based on Signal K paths (e.g.,
navigation.speedOverGround). - Tagging: Automatically tags data with
vessel(URN) andsourcefor rich query capabilities. - Batching: Buffers incoming deltas and flushes them in batches to reduce network requests.
- Configurable: Fully configurable via the SignalK Admin UI.
Installation
From AppStore (Recommended)
- Open your SignalK Admin UI.
- Go to Appstore -> Available.
- Search for
signalk-to-greptimedb. - Click Install.
Manual Installation
cd /path/to/signalk/
npm install signalk-to-greptimedbConfiguration
After installation, configure the plugin in Server -> Plugin Config:
- GreptimeDB Host: Hostname of your GreptimeDB instance (default:
greptimedborlocalhost). - GreptimeDB HTTP Port: usually
4000(default:4000). - Database Name: Database to write to (default:
public). - Username: Database username (if authentication is enabled).
- Password: Database password (if authentication is enabled).
- Batch Size: Number of points to buffer before sending (default:
500). - Flush Interval: Maximum time (ms) to wait before sending a batch (default:
1000).
Data Schema & Querying
Data is stored using the InfluxDB Line Protocol model:
- Measurement (Table): The Signal K path (e.g.,
navigation.speedOverGround). - Tags:
vessel: The vessel URN (e.g.,urn:mrn:signalk:uuid:...).source: The source label or talker ID.
- Fields:
value: The sensor value (number, string, or boolean).
- Timestamp: The time of the update (in nanoseconds).
Example Query (SQL)
You can query the data using standard SQL in GreptimeDB:
-- Get the last 10 speed readings
SELECT * FROM "navigation.speedOverGround" ORDER BY greptime_timestamp DESC LIMIT 10;GreptimeDB Installation Guide
Docker (Recommended)
Add this service to your docker-compose.yml:
services:
greptimedb:
image: greptime/greptimedb:latest
container_name: greptimedb
restart: unless-stopped
ports:
- "4000:4000"
- "4001:4001"
- "4002:4002"
- "4003:4003"
volumes:
- greptimedb-data:/var/lib/greptimedb
command: standalone start --http-addr 0.0.0.0:4000
volumes:
greptimedb-data:License
Apache-2.0
