Daily email report

conradb

Cadet
Joined
May 14, 2017
Messages
5
I tried to glean some clues from thread https://www.ixsystems.com/community/threads/disabling-daily-run-output.55361/ to find a way of extending the daily security run job output to also just mail me something like the output from a
zpool get size,capacity

in an email, I found a clue in https://www.ixsystems.com/community/threads/howto-manage-automatic-daily-email-reports.11911/ which says we can create some temp files in a chron job that the prior thread is extending too. But why not create a new task? So, if I learn just enough bash I can
rm /tmp/mymessage 2>&1 >/dev/null
zpool get size,capacity /tmp/mymessage
cat /tmp/mymessage | mail -s "zpool daily status" root

I'm just not sure of the best practice here on getting a basic report because I'm sure there is a more elegant or a correct/intended way and I feel like I have the wrong end of the stick. (I've not even figured out how to add signatures in this forum yet)
 
Top