asynqmon/README.md

105 lines
2.4 KiB
Markdown
Raw Normal View History

2021-01-31 11:10:10 +08:00
# Asynqmon
Asynqmon is a web based tool for monitoring and administrating Asynq queues and tasks.
2021-02-01 13:50:46 +08:00
## Compatibility
Current version of Asynqmon is compatible with [Asynq v0.15 or above](https://github.com/hibiken/asynq/releases).
2021-04-07 12:03:14 +08:00
## Install
2021-01-31 11:10:10 +08:00
### Release binaries
You can download the release binary for your system from the
[releases page](https://github.com/hibiken/asynqmon/releases).
2021-04-07 12:03:14 +08:00
### Docker image
To pull the docker image:
```bash
# Pull the latest image
docker pull hibiken/asynqmon
# Or specify the image by tag
docker pull hibiken/asynqmon[:tag]
```
2021-01-31 11:10:10 +08:00
### Building from source
To build Asynqmon from source code, first ensure that have a working
Go environment with [version 1.16 or greater installed](https://golang.org/doc/install).
You also need [Node.js](https://nodejs.org/) and [Yarn](https://yarnpkg.com/)
installed in order to build the frontend assets.
Download the source code and then run:
```bash
make build
2021-01-31 11:10:10 +08:00
```
The `asynqmon` binary should be created in the current directory.
2021-04-07 12:03:14 +08:00
### Building docker image
2021-01-31 11:10:10 +08:00
2021-04-07 12:03:14 +08:00
To build docker image locally, run:
2021-01-31 11:10:10 +08:00
```bash
2021-04-07 12:03:14 +08:00
make docker
2021-01-31 11:10:10 +08:00
```
2021-04-07 12:03:14 +08:00
## Run
2021-01-31 11:10:10 +08:00
2021-04-07 12:03:14 +08:00
To use the defaults, simply run and open http://localhost:8080.
2021-02-01 13:50:46 +08:00
```bash
2021-04-07 12:03:14 +08:00
# with a local binary
./asynqmon
2021-04-07 12:03:14 +08:00
# with docker
docker run --rm \
--name asynqmon \
-p 8080:8080 \
hibiken/asynqmon
```
2021-04-07 12:03:14 +08:00
By default, Asynqmon web server listens on port `8080` and connects to a Redis server listening on `127.0.0.1:6379`.
2021-04-07 12:03:14 +08:00
Pass flags to specify port, redis server address, etc.
```bash
2021-04-07 12:03:14 +08:00
# with a local binary
./asynqmon --port=3000 --redis_addr=localhost:6380
# with docker (connect to redis-server running on the host machine)
docker run --rm \
--name asynqmon \
-p 3000:3000 \
2021-04-07 12:03:14 +08:00
hibiken/asynqmon --port=3000 --redis_addr=host.docker.internal:6380
2021-04-07 12:03:14 +08:00
# with docker (connect to redis-server running in a docker container)
docker run --rm \
--name asynqmon \
--network dev-network \
-p 8080:8080 \
asynqmon --redis_addr=dev-redis:6379
2021-02-01 13:50:46 +08:00
```
2021-04-07 12:03:14 +08:00
To see all available flags, run
```bash
# with a local binary
./asynqmon --help
# with docker
docker run hibiken/asynqmon --help
```
Next, go to [localhost:8080](http://localhost:8080) and see Asynqmon dashboard:
![Screenshot](https://user-images.githubusercontent.com/11155743/113557216-57af2b80-9606-11eb-8ab6-df023b14e5c1.png)
2021-01-31 11:10:10 +08:00
## License
Asynqmon is released under the MIT license. See [LICENSE](https://github.com/hibiken/asynqmon/blob/master/LICENSE).