1.0.5 • Published 7 years ago
mqtt-top v1.0.5
mqtt top
This small tool reads messages from MQTT and shows a line for each unique metadata.ssrc with min/max payload length, min/max latency between to messages for the same ssrc and a chart for the last 30 received messages.
Example
Install
npm install -g mqtt-topRun
BROKER_URL=mqtt.prod.aigent.com:1883 \
BROKER_USERNAME=my-username \
BROKER_PASSWORD=my-password \
BROKER_TOPIC=buffer \
mqtt-topEnvironment Variables
| Name | Default | Description |
|---|---|---|
| BROKER_URL | localhost:1883 | MQTT Broker hostname + port |
| BROKER_USERNAME | changeme | MQTT Broker username |
| BROKER_PASSWORD | changeme | MQTT Broker password |
| BROKER_TOPIC | buffer | MQTT Broker topic to subscribe to |
| SESSION_TTL | 20000 | Milliseconds when a session can be considered as ended |
| SPARKLINE_COUNT | 30 | Amount of items to draw for Last Latencies and Last Payloads |
| REFRESH_INTERVAL | 1000 | Refresh interval in milliseconds |
| LOG_HISTORY | 20 | Amount of history items to keep and show |
| MAX_ROWS | automagically | Defines the max. amount of rows to print, if not given it is determined automatically by the terminal height |