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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Uptime Kuma
  3. Using Webhooks

Using Webhooks

Scheduled Pinned Locked Moved Uptime Kuma
7 Posts 4 Posters 3.6k Views 6 Watching
  • 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 Offline
    M Offline
    mazarian
    wrote on last edited by
    #1

    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
    
    girishG 1 Reply Last reply
    1
    • M mazarian

      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
      
      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @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
      2
      • girishG girish

        @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 Offline
        M Offline
        mazarian
        wrote on last edited by
        #3

        @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
        0
        • luckowL Online
          luckowL Online
          luckow
          translator
          wrote on last edited by
          #4

          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
          2
          • luckowL luckow

            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.

            T Offline
            T Offline
            thetomester13
            App Dev
            wrote on last edited by
            #5

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

            luckowL 1 Reply Last reply
            2
            • T thetomester13

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

              luckowL Online
              luckowL Online
              luckow
              translator
              wrote on last edited by
              #6

              @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
              2
              • luckowL luckow

                @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 🙂

                T Offline
                T Offline
                thetomester13
                App Dev
                wrote on last edited by
                #7

                @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
                2
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Bookmarks
                • Search