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

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

    Feature Requests
    disk space api monitor
    3
    7
    122
    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
      msbt App Dev last edited by

      From here. So we can monitor the space with tools like Grafana to avoid running out, because the check and notification mails aren't always reliable.

      1 Reply Last reply Reply Quote 1
      • M
        msbt App Dev last edited by

        Is there something new to report on this? I just had a server that hit 100% disk space because of the new base image and mail storage but there was no email going out. It was pure luck that I saw that (still a few MB left) to avoid bigger problems. The readonly token is available I see, thanks for that!

        How does everybody else monitor their diskspace?

        girish 1 Reply Last reply Reply Quote 2
        • girish
          girish Staff @msbt last edited by

          @msbt AFAIK, linux provides no event for disk usage. So, one just has to poll a lot. du based polling can churn the disk a lot.

          I would also like to know how this is done outside Cloudron.

          M robi 2 Replies Last reply Reply Quote 1
          • M
            msbt App Dev @girish last edited by

            @girish but we do have the Cloudron notification, it just doesn't send out an email about it. Could we make that a webhook or something so we can trigger alerts? I think that was the case once (email notification), but not anymore it seems.

            girish 1 Reply Last reply Reply Quote 0
            • robi
              robi @girish last edited by

              @girish things that don't churn disk are non filesystem based polling, such as /proc or other similar kernel based APIs.

              This can also be done in a multi stage way, for example, monitoring a /proc node for inodes that lets you know of a calculated threshold being reached after which you can query disks or filesystem for more specificity.

              Life of Advanced Technology

              1 Reply Last reply Reply Quote 0
              • girish
                girish Staff @msbt last edited by

                @msbt ah ok, so you just want better notifications . Can do that.

                In 7.3.4 atleast, we started collecting du information in a cron job (every 24 hours).

                M 1 Reply Last reply Reply Quote 1
                • M
                  msbt App Dev @girish last edited by msbt

                  @girish yes, I just want to get notified either by Cloudron via email (because I'm not always logging in and seeing the notifications) or some other means (i.e. regularly checking an API endpoint) if disk space is running low. It's not about individual space usage of apps, just the df of the main disk

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