Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have this in a monit script (lines 11-13):

check program foo with
    path "/usr/local/bin/foo.sh" with timeout 300 seconds
       if status != 0 then alert dan@example.com

monit reload says:

/etc/monit/conf.d/example:13: Error: syntax error 'dan@example.com'

None of the examples show an email with the alert, but I need one. Why can I not give one here?

I'm using Monit 5.5.

share|improve this question

1 Answer 1

Check the documentation at http://mmonit.com/monit/documentation/monit.html#setting_a_local_alert_statement it has the following example

check process mybar with pidfile /var/run/mybar.pid
  alert foo@bar only on { timeout }
share|improve this answer
    
I saw that example, but how does it relate to this? That example says "each service can have its own recipient list." How is this statement a service? And it also shows that a legal alert in that context has only an email address, no "only on { timeout }". –  dfrankow Apr 4 '13 at 14:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.