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. Feature Requests
  3. App Error / Status Page

App Error / Status Page

Scheduled Pinned Locked Moved Feature Requests
19 Posts 7 Posters 2.6k Views 7 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.
  • nebulonN Offline
    nebulonN Offline
    nebulon
    Staff
    wrote on last edited by
    #5

    For reference also, if someone needs a bit more detail on the apps health, the api endpoint for this is documented at https://docs.cloudron.io/api.html#tag/Apps/paths/~1apps~1{appid}/get

    Not sure if uptime kuma can be scripted that way to extract health and runState from the json result.

    nichu42N 1 Reply Last reply
    1
    • nichu42N nichu42

      @JLX89 Thanks for pointing me to the Cloudron API. That's a much more elegant way to track the status with Uptime Kuma than my current approach! Not to mention that it probably uses less bandwidth than loading the actual app web interface for each uptime check.

      Still, I'd like to have a page in the Cloudron GUI that allows me to set up custom error pages.

      P.S. / Edit: For others who are reading this thread and like to make use of the API health check, this is the actual URL to enter in Uptime Kuma:
      https://my.cloudron.domain/api/v1/apps/{AppIdFromStep2}?access_token={TokenFromStep1}

      jdaviescoatesJ Offline
      jdaviescoatesJ Offline
      jdaviescoates
      wrote on last edited by
      #6

      @nichu42 said in App Error / Status Page:

      That's a much more elegant way to track the status with Uptime Kuma than my current approach!

      I'm currently just using the standard default HTTP(s) monitor, e.g.

      c9d89cc4-6f2f-4abd-8db9-bc0d7814b896-image.png

      I'm wondering how using the API would be better. Better how? 🤔

      I use Cloudron with Gandi & Hetzner

      J 1 Reply Last reply
      1
      • jdaviescoatesJ jdaviescoates

        @nichu42 said in App Error / Status Page:

        That's a much more elegant way to track the status with Uptime Kuma than my current approach!

        I'm currently just using the standard default HTTP(s) monitor, e.g.

        c9d89cc4-6f2f-4abd-8db9-bc0d7814b896-image.png

        I'm wondering how using the API would be better. Better how? 🤔

        J Offline
        J Offline
        JLX89
        wrote on last edited by JLX89
        #7

        @jdaviescoates I found using the api was much more reliable (json app responses), especially if you're using Cloudflare. I found that if the app was down but Cloudflare (Always On) would show a http response so the app wouldn't be showing the true status.

        1 Reply Last reply
        3
        • nebulonN nebulon

          For reference also, if someone needs a bit more detail on the apps health, the api endpoint for this is documented at https://docs.cloudron.io/api.html#tag/Apps/paths/~1apps~1{appid}/get

          Not sure if uptime kuma can be scripted that way to extract health and runState from the json result.

          nichu42N Offline
          nichu42N Offline
          nichu42
          wrote on last edited by
          #8

          @nebulon said in App Error / Status Page:

          Not sure if uptime kuma can be scripted that way to extract health and runState from the json result.

          It appears to me that neither JSON key matching nor Regex are implemented yet, but there are open issues for both.

          I was just taking the advice from @JLX89 because I felt that checking for runState might not be enough. But could you please explain the check behind health=healthy?

          Matrix: @nichu42:blueplanet.social

          J 1 Reply Last reply
          1
          • nichu42N nichu42

            @nebulon said in App Error / Status Page:

            Not sure if uptime kuma can be scripted that way to extract health and runState from the json result.

            It appears to me that neither JSON key matching nor Regex are implemented yet, but there are open issues for both.

            I was just taking the advice from @JLX89 because I felt that checking for runState might not be enough. But could you please explain the check behind health=healthy?

            J Offline
            J Offline
            JLX89
            wrote on last edited by JLX89
            #9

            @nichu42 said in App Error / Status Page:

            @nebulon said in App Error / Status Page:

            Not sure if uptime kuma can be scripted that way to extract health and runState from the json result.

            It appears to me that neither JSON key matching nor Regex are implemented yet, but there are open issues for both.

            I was just taking the advice from @JLX89 because I felt that checking for runState might not be enough. But could you please explain the check behind health=healthy?

            I've had it setup using the following and it seems to have been working, if the app goes offline it is reflected in Uptime Kuma.

            • Monitor Type: HTTPS(s) - Keyword
            • URL: Cloudron API URL
            • Keyword: healthy
            • HTTP Options - Method: "GET"

            I'm assuming you could probably pull either of the following based on the Cloudron API documentation: "runState": "running" or "health": "healthy"?

            This at least seems to be working for me -- but could be a better way of doing this. The obvious downfall is if you're tracking uptime rather than just status if you make config changes or need to restart the app this is reflected -- so we bumped up the heartbeat retry levels.

            1 Reply Last reply
            2
            • nichu42N Offline
              nichu42N Offline
              nichu42
              wrote on last edited by
              #10

              Revisiting this thread... Is a custom error page a planned feature? Or is it already possible and I just missed it?

              Matrix: @nichu42:blueplanet.social

              BrutalBirdieB 1 Reply Last reply
              1
              • nichu42N nichu42

                Revisiting this thread... Is a custom error page a planned feature? Or is it already possible and I just missed it?

                BrutalBirdieB Offline
                BrutalBirdieB Offline
                BrutalBirdie
                Partner
                wrote on last edited by
                #11

                @nichu42
                If you want to hack around.

                ⚠️ Notice: totally unofficial!

                The files are here /home/yellowtent/box/dashboard/dist/

                appstatus.html
                notfound.html
                

                You could hack a custom HTML in there, replacing the files (make a backup of the original files), which just redirects to, lets say, an uptime kuma or something else.

                Have fun 😉

                Like my work? Consider donating a drink. Cheers!

                1 Reply Last reply
                0
                • girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #12

                  I guess https://docs.cloudron.io/branding/#custom-pages

                  BrutalBirdieB 1 Reply Last reply
                  5
                  • nichu42N Offline
                    nichu42N Offline
                    nichu42
                    wrote on last edited by
                    #13

                    Excellent, thanks!

                    Matrix: @nichu42:blueplanet.social

                    1 Reply Last reply
                    0
                    • girishG girish

                      I guess https://docs.cloudron.io/branding/#custom-pages

                      BrutalBirdieB Offline
                      BrutalBirdieB Offline
                      BrutalBirdie
                      Partner
                      wrote on last edited by
                      #14

                      @girish OH! I missed that doc. So it is official 😄

                      Like my work? Consider donating a drink. Cheers!

                      1 Reply Last reply
                      1
                      • nichu42N Offline
                        nichu42N Offline
                        nichu42
                        wrote on last edited by
                        #15

                        Ooops, I think it's the second time I have started a thread that could have been answered with a short RTFM. I'm glad that @girish is way too polite. 😉
                        Thanks, I have set up the custom pages. Works perfectly. Now I can redirect visitors to my (externally hosted) uptime kuma status page when an app is not ressponding.

                        Matrix: @nichu42:blueplanet.social

                        robiR 1 Reply Last reply
                        1
                        • nichu42N nichu42

                          Ooops, I think it's the second time I have started a thread that could have been answered with a short RTFM. I'm glad that @girish is way too polite. 😉
                          Thanks, I have set up the custom pages. Works perfectly. Now I can redirect visitors to my (externally hosted) uptime kuma status page when an app is not ressponding.

                          robiR Offline
                          robiR Offline
                          robi
                          wrote on last edited by
                          #16

                          @nichu42 would you mind letting us know what you implemented and how as the final solution description?

                          Conscious tech

                          nichu42N 1 Reply Last reply
                          1
                          • robiR robi

                            @nichu42 would you mind letting us know what you implemented and how as the final solution description?

                            nichu42N Offline
                            nichu42N Offline
                            nichu42
                            wrote on last edited by nichu42
                            #17

                            @robi
                            Is there any specific you'd like to know?
                            I just did as mentioned in the doc:

                            1. Created a new directory /home/yellowtent/boxdata/custom_pages
                            2. Created two html files app_not_responding.html and notfound.html with nano and pasted in the HTML code that I had prepared on my computer
                            3. Saved and voilà

                            The HTML files contained an explanation of what went wrong and a link to my already existing uptime kuma status page, where I put a note to users if there is a longer downtime (planned or unplanned). I have uptime kuma running on a separate VPS so it does not depend on Cloudron to be working. I am checking for health via API as suggested earlier in this thread. You can see the result here: https://status.42bit.io

                            Matrix: @nichu42:blueplanet.social

                            robiR 1 Reply Last reply
                            3
                            • nichu42N nichu42

                              @robi
                              Is there any specific you'd like to know?
                              I just did as mentioned in the doc:

                              1. Created a new directory /home/yellowtent/boxdata/custom_pages
                              2. Created two html files app_not_responding.html and notfound.html with nano and pasted in the HTML code that I had prepared on my computer
                              3. Saved and voilà

                              The HTML files contained an explanation of what went wrong and a link to my already existing uptime kuma status page, where I put a note to users if there is a longer downtime (planned or unplanned). I have uptime kuma running on a separate VPS so it does not depend on Cloudron to be working. I am checking for health via API as suggested earlier in this thread. You can see the result here: https://status.42bit.io

                              robiR Offline
                              robiR Offline
                              robi
                              wrote on last edited by
                              #18

                              @nichu42 Yes, that's excellent, and the 2 html files are interesting for folks to see as inspirations of what to write and how to redirect to an external site.

                              Especially if they're nice and fancy with CSS! ✨

                              Example or template code is always nice to have.

                              Conscious tech

                              nichu42N 1 Reply Last reply
                              1
                              • robiR robi

                                @nichu42 Yes, that's excellent, and the 2 html files are interesting for folks to see as inspirations of what to write and how to redirect to an external site.

                                Especially if they're nice and fancy with CSS! ✨

                                Example or template code is always nice to have.

                                nichu42N Offline
                                nichu42N Offline
                                nichu42
                                wrote on last edited by
                                #19

                                @robi I'm sorry to disappoint you, but the HTML files I created are very simple. The fancy stuff happens on the uptime kuma page. If you are still interested, here's the code:

                                <!DOCTYPE html>
                                <html>
                                  <head>
                                    <title>HTTP 503 - Service unavailable</title>
                                  </head>
                                  <body>
                                    <center>
                                	<h1>HTTP 503 - Service unavailable</h1>
                                	<p><b>Ooops, sorry. The service you requested is not loading at the moment.<br>
                                	Hopefully it's just a restart as part of regular maintenance, so</b></p>
                                	<h2>please try again in a few minutes.</h2>
                                	<p><b>If you keep getting this error message, please visit our <a href="https://status.42bit.io">status page</a>, which usually has more details about longer outages.</b></p>
                                	<p>If you think the 42bit.io / blueplanet.social admin should have a look at this, please reach out to <a href="mailto:admin@42bit.io">admin@42bit.io</p></a>
                                    </center>
                                  </body>
                                </html>
                                
                                <!DOCTYPE html>
                                <html>
                                  <head>
                                    <title>HTTP 404 - Not found</title>
                                	<meta http-equiv="refresh" content="15; url='https://42bit.io'" />
                                  </head>
                                  <body>
                                    <center>
                                	<h1>HTTP 404 - Not found</h1>
                                	<p><b>Sorry, I cannot find what you were looking for.</b></p>
                                	<p><b>All I can do is redirect you to my <a href="https://42bit.io">home page</a>, which I will try in a few seconds.</b></p>
                                	<p>If you think the 42bit.io / blueplanet.social admin should have a look at this error, please reach out to <a href="mailto:admin@42bit.io">admin@42bit.io</p></a>
                                    </center>
                                  </body>
                                </html>
                                

                                Matrix: @nichu42:blueplanet.social

                                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