Linux OS: CentOS release 6.2 (Final)
Linux 64 Bit
Nagios version 5.5.11
We have email notifications working fine from email server at IP x.x.x.3. This is an external exchange server.
Emails are set up in Nagios XI as sendmail.
We now have a new email server at x.x.x.6. This is also an updated exchange server.
Issues: Emails are going to old x.x.x.3 server.
We have tried the SMTP in Nagios XI and set the new server ip. We do a test email and that comes from the new server x.x.x.6. However, notifications are still using the x.x.x.3 server.
We have tried using sendmail and the test email and the notifications are both are going to the x.x.x3 email server.
Questions:
1. Why is the SMTP notifications using the old server when the Test email uses the new sever?
2. Where else should we be looking for an email setting that is referencing our old server IP?
Thank you.
SMTP vs Sendmail
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: SMTP vs Sendmail
Hello, @chkinc. If you're going to be using SMTP server you should check the SMTP box in the mail settings.
Could you take a screenshot of the Mail Settings page in XI and upload it in this thread? (Admin -> Manage Email Settings, in the left column)?
Also, what commands are you using for Host and Service notifications? It should be xi_host_notification_handler for hosts and xi_service_notification_handler for services. Commands are defined per contact, so you need to open each contact in Core Configurations Manager and check the commands under the Alert Settings tab.
Could you take a screenshot of the Mail Settings page in XI and upload it in this thread? (Admin -> Manage Email Settings, in the left column)?
Also, what commands are you using for Host and Service notifications? It should be xi_host_notification_handler for hosts and xi_service_notification_handler for services. Commands are defined per contact, so you need to open each contact in Core Configurations Manager and check the commands under the Alert Settings tab.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: SMTP vs Sendmail
I have loaded screenshot of Nagios SMTP. The test works just fine with the settings just like this.
I've sent a screenshot of the email settings. (I've x'd out all but the last octet.)
I've uploaded the Notification screen.
The 3:30 alert went out just fine as custom: notify-host-by-email = in the Contact.
the 4:15 alert never went out as Nagios XI -in the contact
This contact is Generic-contact.
It seams to us the problem is the dispatcher may be hard coded for custom:notify-host-by-email. However, we don't know where to look for this value in the Nagois files.
I've sent a screenshot of the email settings. (I've x'd out all but the last octet.)
I've uploaded the Notification screen.
The 3:30 alert went out just fine as custom: notify-host-by-email = in the Contact.
the 4:15 alert never went out as Nagios XI -in the contact
This contact is Generic-contact.
It seams to us the problem is the dispatcher may be hard coded for custom:notify-host-by-email. However, we don't know where to look for this value in the Nagois files.
You do not have the required permissions to view the files attached to this post.
Re: SMTP vs Sendmail
Here is the headers in the 3:15 email we did get: It is going through the x.x.x.3 server when it should be going to the x.x.x.6 like the test email does.
Received: from CHKEX.HelpKey.lan (x.x.x.6) by CHKEX.HelpKey.lan (x.x.x.6)
with Microsoft SMTP Server (TLS) id 135.0.1473.3 via Mailbox Transport; Mon, 8
Apr 2019 15:35:53 -0500
Received: from CHKEX.HelpKey.lan (x.x.x.6) by CHKEX.HelpKey.lan (x.x.x.6)
with Microsoft SMTP Server (TLS) id 135.0.1473.3; Mon, 8 Apr 2019 15:35:52
-0500
Received: from CHK1.HelpKey.lan (x.x.x.3) by CHKEX.HelpKey.lan (x.x.x.6)
with Microsoft SMTP Server (TLS) id 135.0.1473.3 via Frontend Transport; Mon,
8 Apr 2019 15:35:52 -0500
Received: from chknet.help-key.com (x.x.x.26) by mail.help-key.com (x.x.x.3)
with Microsoft SMTP Server id 8.3.515.0; Mon, 8 Apr 2019 15:35:52 -0500
Received: by chknet.help-key.com (Postfix, from userid 500) id 3110750084;
Mon, 8 Apr 2019 15:35:52 -0500 (CDT)
Date: Mon, 8 Apr 2019 15:35:52 -0500
To: <[email protected]>
Subject: ** PROBLEM Host Alert: 129.0.0.2 Test Email Alert for Clients is
DOWN **
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <[email protected]>
From: <[email protected]>
Return-Path: [email protected]
X-MS-Exchange-Organization-AuthSource: CHK1.HelpKey.lan
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 10
X-MS-Exchange-Organization-Network-Message-Id: 8d657174-5b83-4a61-6e37-08d6bc61cb53
X-EXCLAIMER-MD-CONFIG: 680eb28f-83f3-4bca-8a6d-3bc9b6e1dccb
Received: from CHKEX.HelpKey.lan (x.x.x.6) by CHKEX.HelpKey.lan (x.x.x.6)
with Microsoft SMTP Server (TLS) id 135.0.1473.3 via Mailbox Transport; Mon, 8
Apr 2019 15:35:53 -0500
Received: from CHKEX.HelpKey.lan (x.x.x.6) by CHKEX.HelpKey.lan (x.x.x.6)
with Microsoft SMTP Server (TLS) id 135.0.1473.3; Mon, 8 Apr 2019 15:35:52
-0500
Received: from CHK1.HelpKey.lan (x.x.x.3) by CHKEX.HelpKey.lan (x.x.x.6)
with Microsoft SMTP Server (TLS) id 135.0.1473.3 via Frontend Transport; Mon,
8 Apr 2019 15:35:52 -0500
Received: from chknet.help-key.com (x.x.x.26) by mail.help-key.com (x.x.x.3)
with Microsoft SMTP Server id 8.3.515.0; Mon, 8 Apr 2019 15:35:52 -0500
Received: by chknet.help-key.com (Postfix, from userid 500) id 3110750084;
Mon, 8 Apr 2019 15:35:52 -0500 (CDT)
Date: Mon, 8 Apr 2019 15:35:52 -0500
To: <[email protected]>
Subject: ** PROBLEM Host Alert: 129.0.0.2 Test Email Alert for Clients is
DOWN **
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <[email protected]>
From: <[email protected]>
Return-Path: [email protected]
X-MS-Exchange-Organization-AuthSource: CHK1.HelpKey.lan
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 10
X-MS-Exchange-Organization-Network-Message-Id: 8d657174-5b83-4a61-6e37-08d6bc61cb53
X-EXCLAIMER-MD-CONFIG: 680eb28f-83f3-4bca-8a6d-3bc9b6e1dccb
Re: SMTP vs Sendmail
We have resolved our issue. We changed the contact to xi_Contact_generic and alert settings to notify-host-by-email.
Thank you.
Thank you.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: SMTP vs Sendmail
@chkinc, I believe by default, notify-host-by-email command is not using SMTP server. Only xi_host_notification_handler. But glad you got this resolved. I will be closing this thread then but feel free to open a new one if anything else comes up.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.