Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhook payload querystring for Synology Chat Integration #2813

Closed
2 tasks done
lmacknicki opened this issue Feb 21, 2023 · 9 comments
Closed
2 tasks done

Webhook payload querystring for Synology Chat Integration #2813

lmacknicki opened this issue Feb 21, 2023 · 9 comments
Labels
area:monitor Everything related to monitors help Stale

Comments

@lmacknicki
Copy link

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

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

I am trying to post an automated notification to Synology Chat using the Webhook notification type. Synology chat expects a payload querystring parameter formatted like this:

?payload= {"text": "Uptime Kuma alert: {{check.name}} is {{check.status}}"}

I got that format from asking ChatGPT. Not sure where it got the "{{check.name}}" format because it doesn't work. What gets posted to the chat channel on Synology Chat is:

image

So the integration is working but the variable names don't get translated by Uptime Kuma. Again, I don't know where ChatGPT got the syntax, since I can't find an example that uses that syntax.

So my question is, is there a correct syntax that can be put in the querystring that will translate those variables into the actual values or do I need to put in an enhancement request to either allow that functionality or to add a new Notification Type for Synology Chat?

Thanks in advance for your help!

🐻 Uptime-Kuma Version

1.20.1

💻 Operating System and Arch

Ubuntu 20.04

🌐 Browser

Firefox 110.0

🐋 Docker Version

No response

🟩 NodeJS Version

No response

@GymNut
Copy link

GymNut commented Feb 25, 2023

I have created a docker container to take care of this integration.
https://hub.docker.com/r/timblack/webhookrelay
will be nice once it's fully added natively into uptime-kuma :)

@github-actions
Copy link

We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.

@github-actions github-actions bot added the Stale label May 26, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 2 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 28, 2023
@andreigentar
Copy link

andreigentar commented Sep 23, 2023

To correctly format the payload for the Synology Chat webhook notification, you should modify the "Request Body" section in your Uptime Kuma settings as follows:

  • Set "Notification Type" to "Webhook."

  • In the "Friendly Name" field, you can provide any name you prefer.

  • In the "Post URL" field, make sure it follows this format: https://<DS_IP>/webapi/entry.cgi?api=SYNO.Chat.External&method=incoming&version=2&token=%22<YourToken>%22&

  • For the "Request Body," choose "Custom Body" and set the payload as:

payload={"text": "{{ msg }}"}

Please note that it's essential to include & at the end of the "Post URL" after %22.

These settings should ensure that the payload is correctly formatted for Synology Chat.

  1. Uptime Kuma:
  1. Synology Chat:
    2

@michelde

This comment was marked as resolved.

@CommanderStorm CommanderStorm added the area:monitor Everything related to monitors label Jan 3, 2024
@maxXx1
Copy link

maxXx1 commented Oct 7, 2024

My UptimeKuma says:

Error: Additional Headrers is not valid JSON :(

@CommanderStorm
Copy link
Collaborator

What did you put into the Additional Headrers field?

@maxXx1
Copy link

maxXx1 commented Oct 7, 2024

What did you put into the Additional Headrers field?

?payload= {"text": "Uptime Kuma alert: {{check.name}} is {{check.status}}"}

@CommanderStorm
Copy link
Collaborator

That is supposed to go into the Request Body>Custom Body field instead according to the post above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:monitor Everything related to monitors help Stale
Projects
None yet
Development

No branches or pull requests

6 participants