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'm configuring /etc/monitrc and I need a config that Monit sneds an alert email when httpd service start

I'm trying with this configuration:

check process httpd with pidfile /var/run/apache2.pid
  start program = "/etc/init.d/apache2 start"
  stop program  = "/etc/init.d/apache2 stop"
  if 1 restart within 5 cycles then alert

But monit doesn't send alert

Any suggestion?

share|improve this question
    
Can you send a test email from the system? E.g. $ echo "test" | mail -s "This is a test" me@example.com –  Fred Clausen Apr 22 '13 at 16:04
    
yes, I can send emails from the system without problems –  Gon Apr 22 '13 at 16:10
    
Have you checked the alert messages docs, specifically alert statements and the set mailserver config options? –  Fred Clausen Apr 22 '13 at 16:17
    
Yes, i have configured mailserver like another server that it sends monit alert mails –  Gon Apr 22 '13 at 16:26

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.