Question

Issue with Email Notifications in Centreon 23,10

  • 27 February 2024
  • 11 replies
  • 82 views

Badge +5

Hello Centreon Community,

I'm currently experiencing an issue with email notifications in my Centreon setup. I have configured multiple contacts in my contacts.cfg file, each with their own email address for notifications. However, I'm only receiving notifications at one specific email address of the admin (admin@admin.com) and not the others.

I've checked my Postfix configuration and it seems to be correctly set up to relay emails through Office 365's SMTP server using authentication. I've also verified the notification settings for each contact in Centreon and they appear to be configured correctly.

Here is a snippet of my contacts.cfg file:

define contact {
    contact_name                   Exploitation 
    alias                          exploitation 
    email                          exploitation@exploitation.com 
    host_notification_period       workhours 
    service_notification_period    workhours 
    host_notification_options      d,u,r,f 
    service_notification_options   w,u,c,r 
    register                       1 
    timezone                       :Europe/Zurich 
    host_notifications_enabled     1 
    service_notifications_enabled  1 
    host_notification_commands     host-notify-by-email 
    service_notification_commands  service-notify-by-email 
}

define contact {
    contact_name                   Informatique
    alias                          informatique 
    email                          informatique@informatique.com
    host_notification_period       workhours 
    service_notification_period    workhours 
    host_notification_options      d,u,r,f 
    service_notification_options   w,u,c,r,f 
    register                       1 
    timezone                       :Europe/Zurich 
    host_notifications_enabled     1 
    service_notifications_enabled  1 
    host_notification_commands     host-notify-by-email 
    service_notification_commands  service-notify-by-email 
}

define contact {
    contact_name                   admin_admin 
    alias                          admin 
    email                          adminr@admin.com 
    host_notification_period       workhours 
    service_notification_period    workhours 
    host_notification_options      d,u,r,f 
    service_notification_options   w,u,c,r 
    register                       1 
    host_notifications_enabled     1 
    service_notifications_enabled  1 
    host_notification_commands     host-notify-by-email 
    service_notification_commands  service-notify-by-email 
}

 

 


11 replies

Userlevel 6
Badge +18

Hi @m.lazar I hope you configured your contacts through user interface and not directly from contacts.cfg.

Did you link your contacts or associated contact groups with resources?

Badge +5

@Laurent 

Thank you for your feedback.

I configured the contacts via the Centreon interface, and they are associated with supervisor groups such as the admin group.

.

 

Userlevel 6
Badge +18

you must check on your contacts is the notification period as well as notification options allow them to receive notifications.

Please have a look to this chapter of the documentation.

Badge +5

I've verified that the notification period in the contacts is consistent.

 

Userlevel 4
Badge +13

Have you tried to send an emails to all/any of the affected contacts directly from the CLI?

 

https://docs.centreon.com/docs/administration/postfix/#testing-and-troubleshooting-email-configuration

Badge +5

I changed the admin's email address to one of these two contacts' email addresses, and I received the notification : 

 

 

Userlevel 4
Badge +13

That is a step in the right direction I think, did you still try to send emails through the CLI? for those other emails? was it successful?

Badge +5

Yes, I did receive the emails. However, it's strange that in Centreon, the email notifications are only sent to the admin.

Userlevel 6
Badge +18

Try to set “Debug” mode for “Notifications” in Configuration  > Pollers > Engine configuration > “your poller”, in “Log Options” tab. Then generate and export table and check Centreon engine logs

Userlevel 4
Badge +13

Also,

https://docs.centreon.com/docs/monitoring/basic-objects/hosts/#notification-tab

https://docs.centreon.com/docs/monitoring/basic-objects/services/#notifications-tab

🤞

Badge +5

After enabling debug mode, notifications are still only being received by the admin contact.

 

[notifications] [debug] [111121] Raw notification command: /bin/sh -c '/usr/bin/printf "%b" "***** centreon Notification *****\n\nClient: X \nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATE$ Additional Info : $SERVICEOUTPUT$" | /bin/mail -r bot@mail.ch -s "** Centreon X ! $NOTIFICATIONTYPE$ alert - $HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$'

 

[notifications] [info] [111121] SERVICE NOTIFICATION: admin admin;tdhgvabkp;Memory;WARNING;service-notify-by-email;WARNING: physical free: 1.206GB used: 10.793GB size: 11.999GB;

Reply