Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/debdutto/monit-mqtt

Command line tool to monitor your MQTT server.
https://github.com/debdutto/monit-mqtt

command-line command-line-tool javascript js monitoring mqtt node nodejs server statistics stats

Last synced: about 6 hours ago
JSON representation

Command line tool to monitor your MQTT server.

Awesome Lists containing this project

README

        

# monit-mqtt

Powered by: mqttjs

## Installation:

It is preferred you install it globally

```
npm install -g monit-mqtt
```

## Command line options:

Note: All values being passed here indicate defaults.

##### Options
> `--options | --opts | --opt | -o`

###### Usage:
```
monit-mqtt --options options.json
```

All options parameters accepted by MQTT.js are accepted here. For more details head [here](https://github.com/mqttjs/MQTT.js#client).

Note: If option is passed, all other command line options are disregarded. All missing but required options are replaced by defaults of [MQTT.js](https://github.com/mqttjs/MQTT.js)

##### Example
```
{
"port": 1883,
"host": "test.mosquitto.org",
"clean": false,
"clientId": "defaultClient",
"topics": {
"$SYS/broker/clients/connected": 1,
"/#": 1
}
}
```

##### Host
> `--host | -h`

###### Usage:
```
monit-mqtt --host test.mosquitto.org
```
##### Port
> `--port | -p`

###### Usage:
```
monit-mqtt --port 1883
```
##### Clean
> `--clean | --cln | -c`

###### Usage:
```
monit-mqtt --clean true
```
##### ClientId
> `--clientid | --clid | --id`

###### Usage:
```
monit-mqtt --clientid testClient
```
##### Topics
> `--topics | --topic | -t`

###### Usage:
```
monit-mqtt --topic '$SYS/broker/clients/connected' --topic '/#'
```
##### QOS
> `--qos | -q`

###### Usage:
```
monit-mqtt --qos 1
```
##### Log Interval
> `--interval | -i`

Interval in seconds after which stats should be logged.

###### Usage:
```
monit-mqtt --interval 1000
```

###### To Do

* [ ] 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 [email protected]