Sunday, February 17, 2013

Centreon Not Sending Notification Emails


After finally installing Centreon 2.4 on CentOS 6.3, all was up and running, one issue I had left. No email notifications were sent when a host was down although everything seemed to be correctly configured from the GUI (contacts, notification period, etc).

Looking at  /var/log/maillog gave no hints.
But checking /usr/local/nagios/var/nagios.log was helpful.
[1361058638] HOST NOTIFICATION: Supervisor;Centreon2;DOWN;host-notify-by-email;CRITICAL - Host unreachable @ rta nan, lost 100%
[1361058638] Warning: Attempting to execute the command "/usr/bin/printf "%b" "***** centreon Notification *****\n\nType:PROBLEM\nHost: Centreon2\nState: DOWN\nAddress:\nInfo: CRITICAL - Host unreachable @ rta nan, lost 100%\nDate/Time: 17-02-2013" |  -s "Host DOWN alert for Centreon2!"" resulted in a return code of 127.  Make sure the script or binary you are trying to execute actually exists...

There is no command before the -s and the pipe. This results in email delivery failure.


This can be fixed from the GUI.
In Centreon go to Configuration -> Commands, select Notifications from the left.
Two commands need to be edited: host-notify-by-email and service-notify-by-email.
The string /bin/mail has to be inserted after the pipe. Then, export Nagios settings. Of course this fix implies that running /bin/mail from the command line results in successful email delivery.


  1. Replies
    1. Thanks ;)

      Do you receive an irrelevant "HOST UP" mail with every CRITICAL/WARNING... mail ?

  2. Mickaël,

    With your Centreon, please try the steps as below:

    1. Click Configuration>Users, and then click the user account which has such issue.
    2. At "Service Notification Commands", add "notify-by-sendmailservices" to the "Selected" field, and remove "host-notify-by-sendmailhost" or "host-notify-by-email", if any.
    3. Click "save", and restart Nagios.

    I wish this might be helpful to you.

  3. I had the same problem, and I had it in the configuration of my order "Service-notify-by-email" at SERVICEOUTPUT $ $ \ n "| / bin / mail-s" I put "/ usr / bin / mail-s "instead of" / bin / mail-s "

  4. How do i check email queue to be sent to make sure this is working