https://github.com/amirhnajafiz/cemq
A client to check EMQX clusters.
https://github.com/amirhnajafiz/cemq
blackbox emq emqx go golang health-check
Last synced: 7 months ago
JSON representation
A client to check EMQX clusters.
- Host: GitHub
- URL: https://github.com/amirhnajafiz/cemq
- Owner: amirhnajafiz
- Created: 2023-08-30T10:37:53.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-03T13:45:14.000Z (over 1 year ago)
- Last Synced: 2024-12-16T22:03:02.821Z (10 months ago)
- Topics: blackbox, emq, emqx, go, golang, health-check
- Language: Go
- Homepage:
- Size: 70.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CEMQ


CEMQ is an EMQX client-cli to check EMQX clusters as a client. It provides commands to overview an EMQX
cluster as a user, like a blackbox for monitoring EMQX clusters behaviour. This cli is useful when you want to test your EMQX cluster as a normal user.CEMQ is implemented by `Golang` and `Cobra-cli`. Its simple logic avoids any bias in using an EMQX cluster
as a user.## Commands overview
In this table you can see all CEMQ commands and their usages. For more details you can install the cli and run each command with `--help` flag.
| Command | Description | Flags | SubCommands |
|:-------------:|------------------|:-----:|:---------------------:|
| help | returns a full guide and description about CEMQ commands | - | - |
| config | manages the CEMQ cluster configuration | - | select, list, info |
| cluster | handles the cluster connection and health commands | - | connection, health |
| load | generates a load on the EMQX cluster | topics, pubs, subs, interval | - |## Install
After clonning into the project repository, run `make install`. Now you can run `cemq` cli. To make sure that your installation was successful, run `make test`.
### configs
CEMQ stores cluster configs in `~/.config/cemq` directory. In `configs` directory you can create your configs as the following template. Make sure to save your files with `.json` extention.
```json
{
"server": "tcp://0.0.0.0:1883",
"description": "Default EMQX cluster",
"username": "",
"password": ""
}
```You can also pass `server`, `username`, and `password` as global flags in commands. They will override
the current selected config.## Docker
You can use `ghcr.io/amirhnajafiz/cemq:latest` image in order to run CEMQ inside a container or a pod.
An example can be found below:```sh
docker run \
--entrypoint cemq load --pubs 1 --subs 1 --topics 1 --server tcp://0.0.0.0:1883 \
ghcr.io/amirhnajafiz/cemq:latest
```