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. Expose disk usage / free space to API (preferably with a readonly token)

Expose disk usage / free space to API (preferably with a readonly token)

Scheduled Pinned Locked Moved Feature Requests
disk spaceapimonitor
20 Posts 5 Posters 3.1k 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.
  • girishG Offline
    girishG Offline
    girish
    Staff
    wrote on last edited by
    #9

    There is no email currently. We used to have one but when there is no disk space usually you cannot send emails from the server itself either. We have to find some other way of notifications (i.e like a external webhook).

    robiR M 2 Replies Last reply
    0
    • girishG girish

      There is no email currently. We used to have one but when there is no disk space usually you cannot send emails from the server itself either. We have to find some other way of notifications (i.e like a external webhook).

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

      @girish that is too late and not the time to worry about sending email/notifications. It's well before then!

      Conscious tech

      1 Reply Last reply
      1
      • girishG girish

        There is no email currently. We used to have one but when there is no disk space usually you cannot send emails from the server itself either. We have to find some other way of notifications (i.e like a external webhook).

        M Offline
        M Offline
        msbt
        App Dev
        wrote on last edited by
        #11

        @girish wasn't there a threshold when that message apperars? Should be plenty of space to send an email (also, my servers are all using Postmark, maybe that would make it easier to send those messages too?)

        I would rather get too many emails than having to recover a Cloudron because it ran oos 😉 But any kind of notificaton/webhook/api endpoint to monitor disk space would be much appreciated, that's one of my biggest concerns these days.

        1 Reply Last reply
        1
        • nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #12

          At least in the past usually the situation was happening very fast and not that much over time. For example a Cloudron having local disk backups enabled and a backup run quickly fills up the disk or someone syncing large amounts of data via Nextcloud at once.

          M 1 Reply Last reply
          0
          • nebulonN nebulon

            At least in the past usually the situation was happening very fast and not that much over time. For example a Cloudron having local disk backups enabled and a backup run quickly fills up the disk or someone syncing large amounts of data via Nextcloud at once.

            M Offline
            M Offline
            msbt
            App Dev
            wrote on last edited by
            #13

            @nebulon true, that is probably the reason in many cases, but I have a current one where the platformdata logs are >15GB now due to some errors in an app, that didn't grow over night, but still rapidly. Plenty of time to act on it though, if I have a notifcation about it 😉

            1 Reply Last reply
            0
            • timconsidineT Offline
              timconsidineT Offline
              timconsidine
              App Dev
              wrote on last edited by
              #14

              I don't understand the issue here.
              Simple bash script plus ntfy alerting to telegram
              du might create disk churn, but I don't think df does, or to a much lesser degree.
              And it's disk FREE space that needs to be alerted, not the results of what's used (that might be a secondary space if disk free is low)

              M 1 Reply Last reply
              1
              • timconsidineT timconsidine

                I don't understand the issue here.
                Simple bash script plus ntfy alerting to telegram
                du might create disk churn, but I don't think df does, or to a much lesser degree.
                And it's disk FREE space that needs to be alerted, not the results of what's used (that might be a secondary space if disk free is low)

                M Offline
                M Offline
                msbt
                App Dev
                wrote on last edited by
                #15

                @timconsidine of course there are ways to do that outside of Cloudron, but since this affects any and all installations, it would be nice if it was shipped with the platform by default, which will also survive migrations and such.

                It would be cool to set a threshold for any disk and mounted volume in /#/system, either a fixed number or percentage, for when a notification email is sent out.

                1 Reply Last reply
                0
                • timconsidineT Offline
                  timconsidineT Offline
                  timconsidine
                  App Dev
                  wrote on last edited by timconsidine
                  #16

                  I get the desire to have it "in Cloudron".
                  Equally I would have to say that ntfy is an app on Cloudron, just as Grafana is.
                  Seems this is more about wanting Grafana support. Which is fine. No objections to that in itself.

                  However, given the frequency here in the forum of people needing to recover from full disks and the criticality of such events (server down, multiple apps down, recovery work needed), I'm just suggesting a solution that is 'here and now' rather than waiting.

                  There's a cron tab on every app in Cloudron.

                  • Install ntfy and set up to send the alerts how you want (mobile app, Telegram)
                  • add this to a cron entry in an app, setting the user name and password, and also the ntfy app location :
                    */5 * * * * root_space=$(df -h | grep '/$') && root_usage=$(echo $root_space | awk '{ print int($5) }') && if [ $root_usage -gt 80 ]; then echo "Disk usage alert : $root_usage%" | curl -u user:password -X POST --data "payload@-" https://ntfy.domain.uk/alerts; fi

                  Automated no hassle alerts for 5 mins work
                  No excuse for disk full ever again 😄

                  1 Reply Last reply
                  2
                  • timconsidineT Offline
                    timconsidineT Offline
                    timconsidine
                    App Dev
                    wrote on last edited by
                    #17

                    @girish when a Cloudron app is backed up, do the contents of the cron tab get backed up as well ?

                    robiR 1 Reply Last reply
                    1
                    • timconsidineT timconsidine

                      @girish when a Cloudron app is backed up, do the contents of the cron tab get backed up as well ?

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

                      @timconsidine easy to test by cloning the app.

                      Conscious tech

                      1 Reply Last reply
                      2
                      • timconsidineT Offline
                        timconsidineT Offline
                        timconsidine
                        App Dev
                        wrote on last edited by
                        #19

                        @robi true ! good idea

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

                          @robi @timconsidine good catch, I don't think it is. Will fix. Opened https://git.cloudron.io/cloudron/box/-/issues/832 to track internally

                          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