Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitoring Disk Usage #2532

Closed
1 task done
Termex69 opened this issue Jan 4, 2023 · 7 comments
Closed
1 task done

Monitoring Disk Usage #2532

Termex69 opened this issue Jan 4, 2023 · 7 comments
Labels
feature-request Request for new features to be added

Comments

@Termex69
Copy link

Termex69 commented Jan 4, 2023

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find similar feature request

🏷️ Feature Request Type

New Monitor

🔖 Feature description

This feature will enable the monitoring of disk capacity and would alert nearing 100% utilization based on a user threshold.
Example:
/ or C: is set to trigger an alert when the disk capacity reaches 90% Utilization. The user can set the threshold percentage between 70% to 95%.

✔️ Solution

I my mind this can be implemented using the df -h command for Linux & Mac by extracting the current percentage and comparing it to the set user thresshold.
In Windows we can probably look at using wmic but may need to manually calculate the usage as a percentage.

❓ Alternatives

Wmic may take some time for integration but I suspect the Linux and Mac integration may be easier to implement, at least for now as a work in progress.

📝 Additional Context

No response

@Termex69 Termex69 added the feature-request Request for new features to be added label Jan 4, 2023
@Computroniks
Copy link
Contributor

I think that this would be a bit out of scope for Uptime Kuma. The system is designed to measure only uptime, for resources monitoring, I would recommend something like node exporter with Prometheus or librenms

@Termex69
Copy link
Author

Termex69 commented Jan 4, 2023 via email

@fionnb
Copy link

fionnb commented Jan 20, 2023

I agree with @Computroniks. @Termex69, this is "Uptime" Kuma, not "Monitor-It-All" Kuma.
I would recommend to get Zabbix if you need a full-blown Server monitoring solution with a GUI.

The fact that setting up Kuma only takes a few keystrokes and clicks is part of why it is so sexy.
If you pump it up to a do-it-all monitoring solution that appeal will get lost and it would become just another monitoring tool.

@Termex69
Copy link
Author

Termex69 commented Feb 10, 2023 via email

@tikeyknax
Copy link

If you still want to monitor your disk usage with uptime kuma because a full-blown server monitoring solution might be too much and you have uptime kuma already set up, the following solution might work for you (for monitoring the disk usage on linux machines).

  • Setup an uptime kuma check with monitor type "push"
  • Write a script that checks the disk usage and calls the push url
  • Call the script regularly via cron or similar

With this solution, you can monitor the disk usage of every linux machine in your network even if uptime-kuma is not set up on all of them.

Script that checks disk usage of /dev/root and makes the check "down" if more than 90% of the disk is used:

#!/bin/bash

if [ `df | grep -F "/dev/root" | awk '{print $5}' | tr -d %` -le 90 ]; then
  curl -fs -o /dev/null --retry 5 http://<your_push_url>?status=up
else
  curl -fs -o /dev/null --retry 5 http://<your_push_url>?status=down
fi

Crontab entry to call the script every 30 minutes and on reboot:

#healthcheck free space
05,35 * * * * root <path_to_script>
@reboot root <path_to_script>

@CommanderStorm
Copy link
Collaborator

@Termex69
I think this is a duplicate of #2231
If you agree, could you please close this Issue, as duplicates only create immortal zombies and are really hard to issue-manage?
If not, what makes this issue unique enough to require an additional issue? (Could this be integrated into the issue linked above?) ^^

@CommanderStorm
Copy link
Collaborator

Closing as duplicate of #2231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features to be added
Projects
None yet
Development

No branches or pull requests

5 participants