hibiken / asynqmon Goto Github PK
View Code? Open in Web Editor NEWWeb UI for Asynq task queue
License: MIT License
Web UI for Asynq task queue
License: MIT License
Maybe we can record the error info for failed task which is good for debugging and online monitoring
I will try to keep it simple and short
localhost:8080/events/dashboard/
blank page is returned with multiple 404 responses as shown below
Check the code below
// events queue
mon := asynqmon.New(asynqmon.Options{
RootPath: "/events/dashboard",
RedisConnOpt: asynq.RedisClientOpt{Addr: ":6379"},
// registering endpoint
e.GET(mon.RootPath(), func(c echo.Context) error {
c.Response().Header().Set("Content-Type", "text/html; charset=utf-8")
c.Response().Header().Set("Transfer-Encoding", "chunked")
mon.ServeHTTP(c.Response(), c.Request())
return nil
})
OR
// events queue
mon := asynqmon.New(asynqmon.Options{
RootPath: "/events/dashboard",
RedisConnOpt: asynq.RedisClientOpt{Addr: ":6379"},
// registering endpoint
e.GET(mon.RootPath(), echo.WrapHandler(mon))
Hi, is there any way, to build and link to redis from docker-compose?
I tried everything, can not connect to redis.
Even like this:
docker run -d --rm
--name asynqmon
-p 8080:8080
hibiken/asynqmon --redis-addr=172.18.0.4:6379 Can not connect to redis.
but if i try like this: redis-cli -h 172.18.0.4 -p 6379 ping, everything is ok.
I am trying to build new docker image from Dockerfile, but have following issue:
Building asynqmon
Step 1/16 : FROM alpine:3.13 AS frontend
3.13: Pulling from library/alpine
4e9f2cdf4387: Pull complete
Digest: sha256:2582893dec6f12fd499d3a709477f2c0c0c1dfcd28024c93f1f0626b9e3540c8
Status: Downloaded newer image for alpine:3.13
---> 12adea71a33b
Step 2/16 : WORKDIR /static
---> Running in ba029a731c1d
Removing intermediate container ba029a731c1d
---> 23be42dab112
Step 3/16 : RUN apk add --no-cache npm && npm i -g -s --unsafe-perm yarn
---> Running in 4e94d9f6516b
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
(1/8) Installing ca-certificates (20191127-r5)
(2/8) Installing nghttp2-libs (1.42.0-r1)
(3/8) Installing brotli-libs (1.0.9-r3)
(4/8) Installing c-ares (1.17.2-r0)
(5/8) Installing libgcc (10.2.1_pre1-r3)
(6/8) Installing libstdc++ (10.2.1_pre1-r3)
(7/8) Installing nodejs (14.17.6-r0)
(8/8) Installing npm (14.17.6-r0)
Executing busybox-1.32.1-r6.trigger
Executing ca-certificates-20191127-r5.trigger
OK: 71 MiB in 22 packages
/usr/bin/yarn -> /usr/lib/node_modules/yarn/bin/yarn.js
/usr/bin/yarnpkg -> /usr/lib/node_modules/yarn/bin/yarn.js
+ [email protected]
added 1 package in 2.147s
Removing intermediate container 4e94d9f6516b
---> cef867ea8aea
Step 4/16 : COPY ui .
---> b4258e2afff3
Step 5/16 : RUN yarn install && yarn build
---> Running in babaf53cdef4
yarn install v1.22.15
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 0.12s.
yarn run v1.22.15
error Couldn't find a package.json file in "/static"
Hey,
I checked out the repository and one is a great app. I couldn't find a description of whether the application only works with redis db? I'm using NodeJs and Ubuntu 20.04 and I'm looking for something to manage the redis on the server for which this app would be great.
If all is true this only works with https://github.com/hibiken/asynqmon, doesn't it?
Thnaks a lot!
Hello,
When jobs contain large payloads, the preview causes the page to crash.
https://i.imgur.com/iA5G3zH.png
Is it possible to hide this column or view the preview in a separate window / download it as a text file?
This library is amazing BTW. Thank you for creating and maintaining it.
"GET /api/queues HTTP/1.1" 500 214
asynq: 0.18.4
asynqmon: 0.2.2
Hi guys, I'm using as an library. It's run fine in my lap but fail on remote. Can I know what is the root cause of this? Thank you so much.
api/queues
.Stacktrade:
UNKNOWN: UNKNOWN: redis eval error: ERR Error running script (call to f_d2725d6f7a40c52b2534b2526b30a74d28fe023e): @user_script:21: user_script:21: attempt to perform arithmetic on local 'm' (a string value)
https://fonts.googleapis.com/css?family=Inter:300,400,500,700&display=swap
With Inter font dashboard looks more clear:
The module name in go.mod
should be github.com/hibiken/asynqmon
instead of asynq
. I would love to see this fixed as this makes it possible to tag q version of this tool with tools.go
. I can also draft a PR.
Add actions to
from the Web UI
Hi, the logo in Safari and Chrom is now broken.
And the menu set is different in Safari and Chrome.
While I'm trying to run ui from a local machine and everything comes down to the impossibility of connecting to redis, I'm trying to figure it out.
mostly errors:
"GET / api / redis_info HTTP / 1.1" 500 53
tls: DialWithDialer timed out
But I checked the connection from the local machine and everything works, oddities)
For example there is an application running at port 3000, asynqmon running at port 3001. We want the path /asynqmon to proxy to port 3001, which now is impossible because of the path prefix unmatch.
Hi,
I think is a good practice to cover Asynqmon dashboard with some auth procedure to login. A common case is when such tools are put side by side in a Docker container and need to be accessed remotely over the network.
For example, we can set this username
and password
by environment variables at starting Docker container:
docker run --rm \
--name asynqmon \
-e ASYNQMON_USER=user \
-e ASYNQMON_PASSWORD=password \
-p 8080:8080 \
hibiken/asynqmon
And catch them by simple os.Getenv
function in backend.
Yes, it's very-very simple solution, but works and solves all needs on the topic.
Login form can looks like this (without links, only login+pass+button, of course):
https://material-ui.com/getting-started/templates/sign-in/
What do you think about this, @hibiken? 😉
P.S. also, we can make a little hard thing: separation of users into roles (e.g. a super-admin and a guest, like RabbitMQ does). But that's a start for the future!
Environment variables would make this easy to deploy in an environment such as Heroku or Cloud Run without any modifications. So I propose for asynqmon to read environment variables in case the corresponding flag is not set.
Related to #150
The code indicates that the only way to connect asynqmon
to redis
is through a single client connection. This doesn't seem to work when dealing with a cluster setup.
Perhaps if you strings.Split
the address string and detect multiple IPs, you can then set up the connection using the cluster connection configs.
Hi, I have a problem with asynqmon:
Error
Could not retreive servers live data — See the logs for details
But I can see the redis server info from dashboard.
Command:
asynqmon --redis-addr=center.xxxxxxxxx:6380 --redis-db=1 --redis-password=xxxxxxxxxxxxxx
Asynq version:
v0.18.6
Asynqmon version:
0.2.3
Any idea? Thank you.
Dockerfile
FROM alpine:3.6 as alpine
RUN apk add -U --no-cache ca-certificates
FROM hibiken/asynqmon:0.2.2 as asynqmon
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/cert
EXPOSE 3000
ENTRYPOINT [ "./asynqmon", "--redis-url=rediss://xxxx", "--redis-password=xxxxx", "--port=3000" ]
500 (Internal Server Error): x509: certificate signed by unknown authority
overrideMethod @ react_devtools_backend.js:2850
Would u know on how to fix this? I tried doing this https://stackoverflow.com/questions/52601404/aws-ses-error-x509-certificate-signed-by-unknown-authority ? which explains the dockerfile above
Hi,
locally the asynqmon works perfectly, however now that I just deployed it to my heroku setup (using a redis enterprise cloud instance the chrome console log returns these errors:
UNKNOWN: UNKNOWN: redis eval error: ERR Error running script
(call to f_7574d838a4ddc18d626139a5521903c904f1404a):
@user_script:19: @user_script: 19: This Redis command is not allowed from scripts
I googled a bit and this is most likely due to the REDIS server being relatively strict.
Any idea how to circumvent this through an asynqmon configuration (because on the redis enterprise cloud I don't see any EVAL related configurations)
Greetings,
PJ
PS: love your queuing tool and have been in the game for quite some time now :)!
Add --redis_cluster
boolean flag
If the flag is set, display redis cluster node information in redis info page.
api/queues have error ERR unknown command 'memory'
Looks like the Task Processed chart has implicit maximum of 10000 and does not go beyond this number.
Need investigation.
Hi, great project. I'm trying using it on Windows, but can't get it to work.
When running and trying to access the browser, the following error is displayed:
open ui\build\index.html: file does not exist
I have done some diging and have found the problem, but don't know the right "fix", so for this reason I'm opening this issue instead of PR.
Basically on this line, filepath.Abs
returns C:\
Line 59 in 0eb9d88
This causes problems with the check if is /
Line 65 in 0eb9d88
filepath.Join
as well, since it will use \
and GO embed.FS
will not find the file then.The path separator is a forward slash, even on Windows systems.
The only way I could get it to work was making the following changes:
p := r.URL.Path
if filepath.IsAbs(p) {
p = srv.indexFilePath()
} else {
p = path.Join(srv.staticDirPath, p)
}
// ...
func (srv *staticFileServer) indexFilePath() string {
return path.Join(srv.staticDirPath, srv.indexFileName)
}
Currently, the chart tooltips in dark mode is not respecting the theme settings. They should be have a darker background color in dark mode.
Hi,
I think, better way to delivery Asynqmon to macOS/Linux users is a regular Homebrew formula. You can place it to the "tap repository" called, for example, hibiken/homebrew-asynqmon
(this name of repository is required for Homebrew tap formulas).
OK, our formula in ./Formula/tap.rb
is a simple Ruby file with this code:
# ./github.com/hibiken/homebrew-asynqmon/Formula/tap.rb
class Asynqmon < Formula
desc "Asynqmon is a web based tool for monitoring and administrating Asynq queues and tasks."
homepage "https://github.com/hibiken/asynqmon"
version "v0.2.0"
license "MIT"
if OS.mac? && Hardware::CPU.intel?
url "https://github.com/hibiken/asynqmon/releases/download/v0.2.0/asynqmon_v0.2.0_macOS_x86_64.tar.gz"
sha256 "<HASH>" # <-- checksum hash for this file here
end
if OS.mac? && Hardware::CPU.arm?
url "https://github.com/hibiken/asynqmon/releases/download/v0.2.0/asynqmon_v0.2.0_macOS_arm64.tar.gz"
sha256 "<HASH>" # <-- checksum hash for this file here
end
if OS.linux? && Hardware::CPU.intel?
url "https://github.com/hibiken/asynqmon/releases/download/v0.2.0/asynqmon_v0.2.0_Linux_x86_64.tar.gz"
sha256 "<HASH>" # <-- checksum hash for this file here
end
def install
bin.install "asynqmon"
end
test do
system "#{bin}/asynqmon", "--help"
end
def caveats; <<~EOS
Asynqmon server needs to connect to Redis server to serve data.
To start a default server, run `asynqmon` and open http://localhost:8080
To see all available flags, run `asynqmon --help` command.
EOS
end
end
☝️ Please note, this example for
v0.2.0
version and without checksum hashes for eachtar.gz
file.
Next steps:
./Formula
folder in the github.com/hibiken/homebrew-asynqmon
repository.github.com/hibiken/asynqmon
).tar.gz
archives to the release.checksum.txt
file and upload it to the release.And we're ready! Just tap a new formula:
brew tap hibiken/asynqmon
And install Asynqmon as regular Homebrew bottle:
brew install hibiken/asynqmon/tap
That's it! 🎉
Then you just need to update this formula file with new checksum hashes and versions after a new Asynqmon release.
Yes, you can simplify this process by using the solution from GoReleaser, but I think that it would be faster.
What do you think about all of this @hibiken ?
This is a Feature Request: It would be awesome to make this package importable, so I can mount the endpoints onto my own router. If you are ok with this, I would love to draft a PR or at least track some ideas in this issue.
The idea is, that I have a very simple API and would like to run asynqmon
alongside it, from the same app. This is way easier then going for a complicated setup (two apps + proxy).
Usage would look something like this: r.Handler(asynqmon.Handler())
.
Tell me if that is something you would like to see as well.
Building asynqmon
Step 1/16 : FROM alpine:3.13 AS frontend
3.13: Pulling from library/alpine
4e9f2cdf4387: Pull complete
Digest: sha256:2582893dec6f12fd499d3a709477f2c0c0c1dfcd28024c93f1f0626b9e3540c8
Status: Downloaded newer image for alpine:3.13
---> 12adea71a33b
Step 2/16 : WORKDIR /static
---> Running in ba029a731c1d
Removing intermediate container ba029a731c1d
---> 23be42dab112
Step 3/16 : RUN apk add --no-cache npm && npm i -g -s --unsafe-perm yarn
---> Running in 4e94d9f6516b
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
(1/8) Installing ca-certificates (20191127-r5)
(2/8) Installing nghttp2-libs (1.42.0-r1)
(3/8) Installing brotli-libs (1.0.9-r3)
(4/8) Installing c-ares (1.17.2-r0)
(5/8) Installing libgcc (10.2.1_pre1-r3)
(6/8) Installing libstdc++ (10.2.1_pre1-r3)
(7/8) Installing nodejs (14.17.6-r0)
(8/8) Installing npm (14.17.6-r0)
Executing busybox-1.32.1-r6.trigger
Executing ca-certificates-20191127-r5.trigger
OK: 71 MiB in 22 packages
/usr/bin/yarn -> /usr/lib/node_modules/yarn/bin/yarn.js
/usr/bin/yarnpkg -> /usr/lib/node_modules/yarn/bin/yarn.js
v5 is out now, let's upgrade.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.