question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discord notification failing with Docker monitor

See original GitHub issue

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn’t find similar issue

🛡️ 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

  1. Monitor Docker container with Discord notifications enabled
  2. Shut down container
  3. 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

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
louislamcommented, Dec 21, 2022
0reactions
JesusWithPantscommented, Dec 28, 2022

No real detailed steps:

  1. Set up UptimeKuma to monitor container (in this example named BOTBardolph | Docker)
  2. Shut-down said container
  3. 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Container health notifications : r/docker - Reddit
Hi, Is there any free/open source tool to provide an email/discord notification when a container is unhealthy?
Read more >
Uptime Kuma - Docker Container monitoring & alerts on ...
This video has three parts:1. How to get notifications on Discord 2. How to get notifications on Telegram3. How uptime kuma can monitor...
Read more >
Work with notifications - Docker Documentation
Explains how to work with registry notifications. ... If using notification as part of a larger application, it is critical to monitor the...
Read more >
Diun - friendly docker image update notifier - Blackvoid
So let's see how to get this up and running using Portainer and a quick "stack"/docker-compose setup to monitor all images and send ......
Read more >
Alert if a docker container stops - Stack Overflow
I use a small tool called Docker Event Monitor that runs as a container on the Docker host and sends out alerts to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found