Send monit-general mailing list submissions to
address@hidden
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.nongnu.org/mailman/listinfo/monit-general
or, via email, send a message with subject or body 'help' to
address@hidden
You can reach the person managing the list at
address@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of monit-general digest..."
Today's Topics:
1. local alert statement not working (Adam Wolfe)
2. Re: local alert statement not working (Callum Macdonald)
3. Re: local alert statement not working (Wayne Lawrence)
----------------------------------------------------------------------
Message: 1
Date: Mon, 09 Jul 2012 12:37:08 -0400
From: Adam Wolfe <address@hidden>
To: address@hidden
Subject: local alert statement not working
Message-ID: <address@hidden>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.nongnu.org/archive/html/monit-general/attachments/20120709/e1b73198/attachment.html>
------------------------------
Message: 2
Date: Mon, 09 Jul 2012 20:29:32 +0200
From: Callum Macdonald <address@hidden>
To: address@hidden
Subject: Re: local alert statement not working
Message-ID: <address@hidden(null)>
Content-Type: text/plain; charset="UTF-8"
On Mon, 2012-07-09 at 12:37 -0400, Adam Wolfe wrote:
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
The alert is part of the whole check, not part of the individual test,
so I think you want something like (untested, off the top of my head):
check filesystem order-error with path /path/to/error/dir/
alert address@hidden
if space usage > 0 B then exec "my-rsync-statement"
as uid foo and gid bar
Cheers - Callum.
On 9 Jul 2012, at 17:37, Adam Wolfe <address@hidden> wrote:
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_statementbut
I'm not sure if something has changed and this how-to is outdated or
if
I'm simply over-looking something.
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.nongnu.org/archive/html/monit-general/attachments/20120709/1f98d59c/attachment.html>
------------------------------
_______________________________________________
monit-general mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/monit-general
End of monit-general Digest, Vol 114, Issue 5
*********************************************