My nagios instance seems to ignore whatever options I select in Admin > Email Settings and always uses Postfix.
I can set to use SMTP and put in info that works (tested with Send Test email). However, these settings are simply ignored and it uses postfix to send the alerts...
Any ideas?
Current version: XI 5.6.14 on Centos 7
Nagios ignores email server configuration
Re: Nagios ignores email server configuration
It is possible that the contact still has another notification handler defined. If you navigate to Configure using the top bar > click Core Config Manager under the Advanced Configuration on the left > then click Contacts under Alerting on the left > click on the name of the contact you are having trouble with > select the Alert Settings tab > then click Manage Host Notification Commands > do you see xi_host_notification handler or something else? If you migrated from Nagios core to XI, it is possible that your system just retained the old notification handlers set on certain contacts.
You may want to refer to the following linked documentation for more detailed information on how to configure the notification handlers.
CONFIGURING CORE CONTACTS TO USE XI PHP MAILER
This knowledge base article may also come in handy.
XI NOTIFICATION PROBLEMS
Can you please message ( PM ) me your profile and tell me which contact or user you are having trouble with? That will show me exactly how your system is configured. You can download the profile by navigating to System Profile under System Config on the left pane > and clicking the Download Profile button on that page.
You may want to refer to the following linked documentation for more detailed information on how to configure the notification handlers.
CONFIGURING CORE CONTACTS TO USE XI PHP MAILER
This knowledge base article may also come in handy.
XI NOTIFICATION PROBLEMS
Can you please message ( PM ) me your profile and tell me which contact or user you are having trouble with? That will show me exactly how your system is configured. You can download the profile by navigating to System Profile under System Config on the left pane > and clicking the Download Profile button on that page.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios ignores email server configuration
I think this might have something to do with it, we've come from quite some versions ago (before I even started working here).jbrunkow wrote:If you migrated from Nagios core to XI, it is possible that your system just retained the old notification handlers set on certain contacts.
As for my contact, the has "notify-service-by-email". I then looked at the commands.cfg and see this for notify-service-by-email:
/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
For notify-host-by-email:
/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
This would explain postfix as it uses the /bin/mail command...
PS. It seems I can't send PMs yet since I don't have enough posts.
-D
Re: Nagios ignores email server configuration
Well that might be it then!
Were you able to change them to the xi_*_notification handlers?
Were you able to change them to the xi_*_notification handlers?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios ignores email server configuration
Yep, I finally understand how this all works. This also confused things because we had a contact vs a user, both with the same email. Once I set the correct contact, this is working as expected. Now to edit all my services to use the right contact....
Re: Nagios ignores email server configuration
Excellent! I'm happy to hear that.
Is it okay if we close this topic and lock the thread for editing?
Is it okay if we close this topic and lock the thread for editing?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios ignores email server configuration
Yep, problem solved!