I am trying to setup Monit on an auto-scaled group of machines. Ideally I would like monit to send alerts to my nagios service (which is already configured to escalate alerts).

I have found this old post which asked for such a feature, but I cannot find any documentation that describes this. Is it possible to setup custom alerting in Monit?

Best regards

EDIT: I know I could write a bash script that sends passive checks to Nagios, and execute it with an exec command, but I would like to know if there is a cleaner solution, using the alert command.


From the monit docs, it seems that alert is strictly for sending email.

You can use email as a delivery method for Nagios checks by sending the alerts to an email address that gets piped to a script (rather than being delivered to a mailbox), like mail2mon. The script then submits a passive check to Nagios.

If that's not viable, there are a number of ways you can have Nagios poll for similar information. At a minimum, you could use check_file_age on the pid file, or check_logfiles to look for monit events in syslog.

| improve this answer | |
  • Thanks for the suggestions. I think I will probably use the check_logfiles approach, as I already use rsyslog. I think I will use Monit to write to a local log file if there are problems, and forward this to Nagios instance. – Danduk82 Oct 28 '15 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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