Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mjarkk/machinery-dashboard
a dashboard for machinery
https://github.com/mjarkk/machinery-dashboard
Last synced: 16 days ago
JSON representation
a dashboard for machinery
- Host: GitHub
- URL: https://github.com/mjarkk/machinery-dashboard
- Owner: mjarkk
- License: mit
- Created: 2019-08-23T08:32:14.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-01T20:18:07.000Z (over 1 year ago)
- Last Synced: 2024-10-14T20:44:28.689Z (30 days ago)
- Language: Go
- Homepage: https://hub.docker.com/r/mjarkk/machinery-dashboard
- Size: 14.6 MB
- Stars: 23
- Watchers: 4
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# machinery-dashboard
dashboard for [machinery](https://github.com/RichardKnop/machinery) stats![Screenshot](./docs/screenshot.png "Screenshot")
## Setup:
*Note: for storing the stats we use mongodb*
*If more people use this i might add sql support later on*#### 1. Add the event recorder to the machinery worker(s)
```go
import (
"github.com/RichardKnop/machinery/v1"
"github.com/RichardKnop/machinery/v1/config"
"github.com/mjarkk/machinery-dashboard/plugin"
)// Setup machinery
server, _ := machinery.NewServer(&config.Config{
Broker: "redis://localhost",
DefaultQueue: "machinery_tasks",
ResultBackend: "redis://localhost",
})
worker := server.NewCustomQueueWorker(tag, concurrencyToSet, q.Name)// Setup the log listener for machinery
plugin.Init(worker, plugin.Options{
Mongodb: plugin.MongoDBConnectOptions{
ConnectionURI: "mongo://localhost", // you need to change this
Database: "machineryStats",
},
})
```#### 2. Setup the dashboard
Create a config file named: `config.json`
```json
{
"mongodb": {
"connectionURL": "mongodb://localhost:27017",
"database": "stats"
}
}```
Run the docker container
```
docker run \
-p 9090:9090 \
-v `pwd`/config.json:/config.json \
-d mjarkk/machinery-dashboard
```## Build the docker container yourself
```sh
git clone https://github.com/mjarkk/machinery-dashboard
cd machinery-dashboard
docker build -t mjarkk/machinery-dashboard .
```