Email notifications if datasets activity exceed threshold

ShimadaRiku

Contributor
Joined
Aug 28, 2015
Messages
104
Anyone have a script or something to send email notifications to monitor if a specific dataset experience significant activity?

Sometimes I might accidentally delete a folder or large file without realizing months later. Sure there are offline_backups or snapshot, but so much less hassle if caught early.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
Sending an email is easy, I'm just not sure how you roll in a script to monitor system activity. If you want to hook into drive activity and specifically deleting data from a specific dataset then I'm thinking it's more of a custom modification of the software build. I am curious if a script could be written to look at a particular dataset and then constantly compare it's size to see if it's being reduced. The problem with that is I suspect there will be a lot of drive activity doing this under FreeBSD. Linux (TrueNAS Scale) may be a different story from what my old memory thinks I read years ago.

Sometimes I might accidentally delete a folder or large file without realizing months later.
To be honest, when I delete some file and the popup asks me "Are you sure", I just instantly click Ok and move on. It's like a muscle memory action. If I was wrong then hopefully I catch it immediately and can restore it. The thing is, won't you become accustom to something else telling you that you just deleted data, especially when you know you deleted data. So I'm not sure it will work in that sense, however if you are looking at someone else deleting your data, that could help.

Good luck finding a solution, I'm sure there is one out there or you may need to create it yourself.
 
Top