Open phyzical opened 1 month ago
as a workaround im just replicating the discord template in a normal webhook (missing some parts but it does what i want)
{
"embeds": [{
"title": "{% if heartbeatJSON.status == 0 %}❌ Your service {{monitorJSON.name}} went down. ❌{% else %} ✅ Your service {{monitorJSON.name}} is up! ✅{% endif %}",
"color": {% if heartbeatJSON.status == 0 %}16711680{% else %}65280{% endif %},
"timestamp": "{{heartbeatJSON.time}}",
"fields": [
{
"name": "Service Name",
"value": "{{monitorJSON.name}}"
},
{
"name": "Time ({{heartbeatJSON.timezone}})",
"value": "{{heartbeatJSON.localDateTime}}"
}{% if heartbeatJSON.status == 0 %},
{
"name": "Error",
"value": "{{heartbeatJSON.msg}}"
}{% endif %}
]
}]
}
Discord might have changed something about how embeds are handled.
Currently, we supply this embed (code has changed a bit since the last release, but nothing relevant to this issue):
Given that you likely have discord set up as a notification provider and that this kind of debugging does not scale well: Could you try reproducing which of the fields we supply is now not allowed or which we are missing?
hmm thats where i got the source to supply to the generic webhook, ill give the full payload a test later in the week and get back to you
in the meantime would we expect to see {"embeds":["0"]}
instead of the actual payload in the error?
Notifications work perfectly on my side for Docker and HTTP monitors. The same error exists only on the postgres type, where notifications are not being sent. Can you take a look on that implementation?
📑 I have found these related issues/pull requests
🛡️ Security Policy
Description
No notifications are sent, test ones work fine.
On down it complains about the payload sent
👟 Reproduction steps
use docker type notification see error on down
👀 Expected behavior
should send notification
😓 Actual Behavior
it breaks
🐻 Uptime-Kuma Version
Version: 1.23.13
💻 Operating System and Arch
docker
🌐 Browser
frifox
🖥️ Deployment Environment
📝 Relevant log output