It is preferred you install it globally
npm install -g monit-mqtt
Note: All values being passed here indicate defaults.
--options | --opts | --opt | -o
monit-mqtt --options options.json
All options parameters accepted by MQTT.js are accepted here. For more details head here.
Note: If option is passed, all other command line options are disregarded. All missing but required options are replaced by defaults of MQTT.js
{
"port": 1883,
"host": "test.mosquitto.org",
"clean": false,
"clientId": "defaultClient",
"topics": {
"$SYS/broker/clients/connected": 1,
"/#": 1
}
}
--host | -h
monit-mqtt --host test.mosquitto.org
--port | -p
monit-mqtt --port 1883
--clean | --cln | -c
monit-mqtt --clean true
--clientid | --clid | --id
monit-mqtt --clientid testClient
--topics | --topic | -t
monit-mqtt --topic '$SYS/broker/clients/connected' --topic '/#'
--qos | -q
monit-mqtt --qos 1
--interval | -i
Interval in seconds after which stats should be logged.
monit-mqtt --interval 1000
- Support ES5
- Add ability to pass custom event handlers
- Add ability to store stats
- Add ability to web interface plugin
Feedback, suggestions and everything else is always welcome. Email me at debduttoc@gmail.com