leap-stc / leap-stc.github.io

LEAP Technical Operations Manual Website
https://leap-stc.github.io/
5 stars 4 forks source link

Automated Email notifications for users exceeding the User Directory Storage quota #145

Open jbusecke opened 5 months ago

jbusecke commented 5 months ago

Since we keep running into the very disruptive case of filling up our shared volume, we need a more proactive (automated) way to nag users to free up space.

For the time being we should try to regularly do 'maintenance' (see #144) but that becomes tedious very quickly.

Ultimately it would be nice if we could grab the data in the Grafana Table programatically and send out notification emails to each user along the lines of:

Dear <Name>, 
You are currently using <current useage>GB of space in your User Directory, which is more than the allowed 50GB. 
The [User Directory](https://leap-stc.github.io/leap-pangeo/jupyterhub.html#your-user-directory) is only meant for small files (code, notebooks, images, test datasets) and all other data should be stored on one of our [Cloud Buckets](https://leap-stc.github.io/leap-pangeo/jupyterhub.html#leap-pangeo-buckets). 
Please free up space as soon as possible. If you have downloaded large amounts of published data, please ingeste it into the LEAP-Pangeo data catalog, so that it is accessible to the whole community. 

The LEAP Data and Compute Team.