I'm having trouble setting up a local alert statement in monit and
was hoping someone could explain where I'm failing.
I have monit set up to monitor a directory for any files, then sync
them to another box when any our found. We also want to email our
client when these files are found, so they can pick them up.
My statement goes like so:
check filesystem order-error with path /path/to/error/dir/
if space usage > 0 B then alert address@hidden
if space usage > 0 B then exec "my-rsync-statement"
as uid foo and gid bar
All seems to be working well enough, except the
if space usage
> 0 B then alert address@hidden part. When I start
monit it simply states "
Error: syntax error 'address@hidden'".
I'm following the instructions here
http://mmonit.com/monit/documentation/monit.html#setting_a_local_alert_statement
but I'm not sure if something has changed and this how-to is
outdated or if I'm simply over-looking something.