Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/leen15/emq-logs-nodes-stats

Get EMQ nodes stats in console
https://github.com/leen15/emq-logs-nodes-stats

emq emqx logs mqtt statistics

Last synced: 17 days ago
JSON representation

Get EMQ nodes stats in console

Awesome Lists containing this project

README

        

# emq-logs-nodes-stats

This script uses EMQ APIs to detect current status of cluster nodes and print them in console.
It supports API version v2, v3 and v4.
## How to use it

Simple run it as a docker container:
```
docker run -it \
-e MQTT_USERNAME=admin \
-e MQTT_PASSWORD=password \
-e MQTT_SERVER=http://mqtt.your.domain:18083 \
-e MQTT_API_VERSION=v4 \
leen15/emq-logs-nodes-stats
```

And you will receive a list of nodes with useful info:
```
name="[email protected]" uptime="96 days,14 hours, 53 minutes, 35 seconds" version="2.3.11" node_status="Running" clients_count="125"
name="[email protected]" uptime="48 days,11 hours, 51 minutes, 20 seconds" version="2.3.11" node_status="Running" clients_count="143"
name="[email protected]" uptime="47 days,10 hours, 33 minutes, 50 seconds" version="2.3.11" node_status="Running" clients_count="138"
```

This container returns nodes data and then stop itself.
We use it with Kubernetes Cron Jobs, so we can monitoring nodes status and create useful dashboards.