genx
genx is a lightweight CLI tool that generates time-series data following four curve types: cosine, linear, logarithmic, and exponential. It can route output to stdout, HTTP webhook, NATS, or MQTT. It also supports realtime mode so each data point is sent on predefined time internal.
Use cases
- Feed a dashboard with simulated sensor data during a demo
- Test a NATS or MQTT pipeline without physical IoT devices
- Generate realistic load for observability and alerting tests
- Simulate temperature, pressure, or any periodic signal
Use it
# Cosine wave between 20°C and 30°C over 2 days, one point every 3 hours
docker run ghcr.io/lucj/genx -type cos -duration 2d -min 20 -max 30 -step 3h -period 1d
# Stream live data to a webhook in realtime
docker run ghcr.io/lucj/genx -type cos -min 18 -max 26 -duration 1h -step 10s --realtime \
-output webhook -webhook-url http://myserver/ingestEnd-to-end example with a containerised NATS server:
# 1. shared network
docker network create genx-net
# 2. NATS server
docker run -d --name nats --network genx-net nats
# 3. subscriber (another terminal)
docker run --rm --network genx-net natsio/nats-box \
nats sub -s nats://nats:4222 sensors.temp
# 4. generate and publish
docker run --network genx-net ghcr.io/lucj/genx \
-type linear -duration 1h -step 1m \
-output nats -nats-url nats://nats:4222 -nats-subject sensors.tempSource and full documentation on GitHub.