Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/leen15/emq-logs-nodes-stats
- Owner: Leen15
- Created: 2019-08-14T09:03:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-28T13:43:31.000Z (almost 2 years ago)
- Last Synced: 2024-11-20T16:55:42.596Z (3 months ago)
- Topics: emq, emqx, logs, mqtt, statistics
- Language: Ruby
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 itSimple 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.