uptime-kuma
uptime-kuma copied to clipboard
Discord notification failing with Docker monitor
⚠️ Please verify that this bug has NOT been raised before.
- [X] I checked and didn't find similar issue
🛡️ Security Policy
- [X] I agree to have read this project Security Policy
Description
Using docker monitor in conjunction with discord notifications results in error:
2022-12-21T09:55:44.132Z [MONITOR] ERROR: Cannot send notification to BCS INC
Error: Error: AxiosError: Request failed with status code 400 {"embeds":["0"]}
at Discord.throwGeneralAxiosError (/app/server/notification-providers/notification-provider.js:38:15)
at Discord.send (/app/server/notification-providers/discord.js:116:18)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Function.sendNotification (/app/server/model/monitor.js:939:21)
at async beat (/app/server/model/monitor.js:615:25)
at async Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:658:17)
Most likely cause is undefined
value for Failing
variable (which I assume is passed on to the Discord)
2022-12-21T09:55:23.928Z [MONITOR] WARN: Monitor #16 'BOT | Docker': Failing: undefined | Interval: 20 seconds | Type: docker | Down Count: 4 | Resend Interval: 5
Notification when container goes back UP
works, so this seems to be strictly something with DOWN
notifications.
👟 Reproduction steps
- Monitor Docker container with Discord notifications enabled
- Shut down container
- Check UptimeKuma logs
👀 Expected behavior
A Discord message to pop-up once notify gets triggered
😓 Actual Behavior
Errors mentioned above in logs
🐻 Uptime-Kuma Version
1.18.5
💻 Operating System and Arch
Debian 10
🌐 Browser
Google Chrome 108.0.5359.124
🐋 Docker Version
No response
🟩 NodeJS Version
No response
📝 Relevant log output
No response
I have a similar setup as you have posted; discord messages work fine.
Have you used the correct webhook? When setting up the monitor, there is a test button. Whats the output?
The Test works fine (as shown in pic), the
UP
notification works fine, it just fails to notify on DOWN
Related pr: https://github.com/louislam/uptime-kuma/pull/2393
Should be re-opened. Same issue with 1.19.2
version
2022-12-28T11:32:49+02:00 [MONITOR] ERROR: Cannot send notification to BCS INC
Error: Error: AxiosError: Request failed with status code 400 {"embeds":["0"]}
at Discord.throwGeneralAxiosError (/app/server/notification-providers/notification-provider.js:38:15)
at Discord.send (/app/server/notification-providers/discord.js:116:18)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Function.sendNotification (/app/server/model/monitor.js:1096:21)
at async beat (/app/server/model/monitor.js:658:21)
at async Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:726:17)
Double checked, cannot reproduce.
Please provide more info such as detailed steps, Docker version and Node.js version.
No real detailed steps:
- Set up UptimeKuma to monitor container (in this example named
BOTBardolph | Docker
) - Shut-down said container
- See error as described.
NodeJS is latest alpine docker build, Docker:
root@morpheus:~# docker --version
Docker version 20.10.5+dfsg1, build 55c4c88
It could be something I am doing absolutly wrong, but ive tried recreating the container monitor few times - it still keeps failing as above.
I'm also having this issue.
I also have this issue. Discord notifications work for Up status, not work for Down status.
@louislam I see you have pushed a commit that is a possible fix for this issue. How can I test this out? The nightly docker image is out of date.
@louislam I see you have pushed a commit that is a possible fix for this issue. How can I test this out? The nightly docker image is out of date.
Just updated, you can pull the nightly image again.
It works!
Do you know when the next release is going to be pushed to latest
?
It works!
Do you know when the next release is going to be pushed to
latest
?
Thanks, close as solved.
1.19.3 should be released this week.
Confirmed as working now with 1.19.3
, thanks!
I am not getting a "Down/Up" Discord notification, but the test notification sends successfully. I am on version 1.23.11.
@Honorme94 This is an issue which has been resolved quite a while ago. Your issue is unlikely to be related => please open a new issue with reproduction steps