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
  • Brite
  • 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. Feature Requests
  3. Expose health check API

Expose health check API

Scheduled Pinned Locked Moved Feature Requests
4 Posts 3 Posters 589 Views 4 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.
  • andreasduerenA Offline
    andreasduerenA Offline
    andreasdueren
    wrote on last edited by
    #1

    The documentation isn’t super clear but it appears there is no way to poll the health check of apps via the API or otherwise programmatically, correct?

    I’d like to monitor them with uptime kuma since the error page of apps when they fail to start properly would resolve regularly and therefore not trigger an outage warning with uptime kuma.

    1 Reply Last reply
    3
    • robiR Offline
      robiR Offline
      robi
      wrote on last edited by
      #2

      Of course there is.. you just need the internal address of the app and get the /healthcheck http request

      Conscious tech

      1 Reply Last reply
      2
      • jamesJ Offline
        jamesJ Offline
        james
        Staff
        wrote on last edited by
        #3

        Hello @andreasdueren
        You can use the https://$CLOUDRON_DOMAIN/api/v1/apps/{APPID} - API DOC LINK API route to get the health and runState of an app.

        Example with my.demo.cloudron.io:

        curl -s "https://my.demo.cloudron.io/api/v1/apps/369f89a2-0e88-4c26-b3e3-8f622b1c5141" -H "Authorization: Bearer 5b28f006a867cba7c7c031553c76058e2054cce65fe27792ead5c85af2f0b6fb" | yq -r .health
        healthy
        

        or

        curl -s "https://my.demo.cloudron.io/api/v1/apps/369f89a2-0e88-4c26-b3e3-8f622b1c5141" -H "Authorization: Bearer 5b28f006a867cba7c7c031553c76058e2054cce65fe27792ead5c85af2f0b6fb" | yq -r .runState
        running
        

        After writing this and reading your post again, are you writing about the healthCheckPath of the CloudronManifest.json?
        So, getting this path via the Cloudron API?
        If so, here you go:

        curl -s "https://my.demo.cloudron.io/api/v1/apps/369f89a2-0e88-4c26-b3e3-8f622b1c5141" -H "Authorization: Bearer 5b28f006a867cba7c7c031553c76058e2054cce65fe27792ead5c85af2f0b6fb" | yq -r .manifest.healthCheckPath
        /
        
        andreasduerenA 1 Reply Last reply
        3
        • jamesJ james

          Hello @andreasdueren
          You can use the https://$CLOUDRON_DOMAIN/api/v1/apps/{APPID} - API DOC LINK API route to get the health and runState of an app.

          Example with my.demo.cloudron.io:

          curl -s "https://my.demo.cloudron.io/api/v1/apps/369f89a2-0e88-4c26-b3e3-8f622b1c5141" -H "Authorization: Bearer 5b28f006a867cba7c7c031553c76058e2054cce65fe27792ead5c85af2f0b6fb" | yq -r .health
          healthy
          

          or

          curl -s "https://my.demo.cloudron.io/api/v1/apps/369f89a2-0e88-4c26-b3e3-8f622b1c5141" -H "Authorization: Bearer 5b28f006a867cba7c7c031553c76058e2054cce65fe27792ead5c85af2f0b6fb" | yq -r .runState
          running
          

          After writing this and reading your post again, are you writing about the healthCheckPath of the CloudronManifest.json?
          So, getting this path via the Cloudron API?
          If so, here you go:

          curl -s "https://my.demo.cloudron.io/api/v1/apps/369f89a2-0e88-4c26-b3e3-8f622b1c5141" -H "Authorization: Bearer 5b28f006a867cba7c7c031553c76058e2054cce65fe27792ead5c85af2f0b6fb" | yq -r .manifest.healthCheckPath
          /
          
          andreasduerenA Offline
          andreasduerenA Offline
          andreasdueren
          wrote on last edited by
          #4

          @james Perfect, thank you!

          1 Reply Last reply
          1
          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