Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Using Webhooks

    Uptime Kuma
    4
    7
    1034
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mazarian last edited by

      Hi all! Really loving Uptime Kuma and wanted to know if anyone has tips on how to setup webhooks in there. I am running a separate Apprise API docker container on another machine (secured via Nginx and ACLs) and am thinking the only way I could pass notifications off is by using the webhook notification option in Uptime Kuma. There isn't much documentation on how to format the webhook and I was curious if anyone can offer some help.

      For reference, I'm able to fire off notifications using the curl command like this:

      curl -X POST -d '{"urls": "gchat://xxx/yyy/zzz", "body":"test message"}' -H "Content-Type: application/json" https://user:password@domain.tld/notify
      

      OR

      curl -X POST -d 'urls=gchat://xxx/yyy/zzz&body=test message' https://user:password@domain.tld/notify
      
      girish 1 Reply Last reply Reply Quote 1
      • girish
        girish Staff @mazarian last edited by

        @mazarian From what I can tell from https://github.com/louislam/uptime-kuma/blob/0dbecca10f5aaf53795f9f7a9568717372b9fcec/server/notification.js#L53, you just put the URL. The body of the message is always:

                        {
                            heartbeat: heartbeatJSON,
                            monitor: monitorJSON,
                            msg,
                        };
        
        M 1 Reply Last reply Reply Quote 2
        • M
          mazarian @girish last edited by

          @girish Thank you! Sadly, without the ability to pass other content in JSON, I won't be able to use a remote Apprise instance with Uptime Kuma.

          1 Reply Last reply Reply Quote 0
          • luckow
            luckow translator last edited by

            Nice 🙂 I am trying uptime via webhook to n8n to rocket.chat. In principle, it works. The next invested hour will be about the payload.

            Pronouns: he/him | Primary language: German

            T 1 Reply Last reply Reply Quote 2
            • T
              thetomester13 App Dev @luckow last edited by

              @luckow that's what I did (ish)! Uptime Kuma notifications => n8n webhook => Matrix notification.

              luckow 1 Reply Last reply Reply Quote 2
              • luckow
                luckow translator @thetomester13 last edited by

                @thetomester13 cool. That's what "worked" for me.
                69dc9be4-a47a-4500-afb9-ae3c36eae257-image.png 1fc995ee-3bab-4efa-b072-0a939e8fd29a-image.png 1535f86b-8911-4706-b3c2-7511ac85d2de-image.png
                "Problem": the workflow sends PAYLOAD ??? into the rocket.chat channel. I need to read the n8n docs to solve this. But every time I click the test button in uptime, I get the message in rocket.chat. MVP done 🙂

                Pronouns: he/him | Primary language: German

                T 1 Reply Last reply Reply Quote 2
                • T
                  thetomester13 App Dev @luckow last edited by

                  @luckow for reference, this is the Expression I have in my 'text' field:
                  {{JSON.stringify($json["body"])}}
                  I output the entire JSON body stringified because I use this webhook for multiple incoming notifications and they contain different payloads. But you can try and extrapolate from here by bringing in just the fields you need, i.e msg, monitor, etc.

                  1 Reply Last reply Reply Quote 2
                  • First post
                    Last post
                  Powered by NodeBB