Cron job to sent email alerts on disk space usage

JeePee

New member
Joined
Jun 19, 2019
Messages
3
Hi,

Is it possible to create a cronjob that sends an email alert when a user (in a reseller account) has reached 70% of their allocated disk space?

I have been looking at the API info but I have no clue what I need and how to use it.


Reason for asking is that DA does a nightly check on the allocated space and sends a warning where there is only 5% (?) space left. For smaller packages that's a very small margin that can fill up pretty quickly between two nightly checks. So according to the nightly check there is still enough space and during the day someone sends/receives to 5 colleagues with a 25mb video and poof, website suspended and mailbox full. And you don't get a warning until the next nightly check.

Thanks
JP
 

JeePee

New member
Joined
Jun 19, 2019
Messages
3
Thank you zEitEr,

I have a reseller account and no access to directadmin.conf to change user_warning_thresh_disk=95
Hence the question if I can do this with the API and a cronjob.

Is it possible to use your plugin you mention on the other page on a reseller level?

Thanks
JP
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,161
Location
GMT +7.00
Plugins can be installed only on admin level. As a reseller you can not install any plugin into Directadmin.

Yes, you can use API and crontab for this. I don't have any ready solution for this case, you can check what DirectAdmin has already here: https://www.directadmin.com/search_versions.php?query=API

If you need a custom solution, please feel free to open a ticket on a site from my signature, and we could discuss the project and its price.
 
Top