Is there a way to access the $DATE $SERVICE $DESCRIPTION variables when composing an e-mail?
Issue #758
resolved
For example, if a file doesn't exist I want to execute file.sh
that sends an email.
check file alerttest2 with path /.nonexistent if file does not exist exec "file.sh"
In files.sh
I want to have something like
mail.mailutils -s "SUBJECT" email@domain <<< "$SERVICE at $DATE with $DESCRIPTION"
I tried something similar to the above but the $SERVICE $DATE and $DESCRIPTION are empty.
Thank you!
Comments (2)
-
repo owner -
repo owner - changed status to resolved
- Log in to comment
Yes, see the manual for more details: https://mmonit.com/monit/documentation/monit.html#ENVIRONMENT