NAgios XI email functionaity and Azure AD integration not wo
NAgios XI email functionaity and Azure AD integration not wo
hi,
I am trying to set up the email functionality on Nagios XI VM's but it is not working.
I have tried both the options
- postfix
- SMTP (office365)
Please support here if some configuration is required initially.
Thanks..
Amit
I am trying to set up the email functionality on Nagios XI VM's but it is not working.
I have tried both the options
- postfix
- SMTP (office365)
Please support here if some configuration is required initially.
Thanks..
Amit
Re: NAgios XI email functionaity and Azure AD integration no
Did you follow this guide here?
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Please go to Admin > Manage Email Settings:
- Make sure Debug Log is checked
- Click the Update Settings button
- Take a screenshot of the settings here and send it to me
Then run this tail command (and leave it running):
Then force a notification to be sent then send me the full output of the tail command above and any errors you see on the screen.
Does it work if you go to Admin > Manage Email Settings > Send a Test Email?
Please include all output from the screen and any errors that you receive.
----
NOTE: I'm just including this info in case you're unsure how to test
How to submit passive results for testing:
For Hosts
------------
Go to Home > Service Status:
- Find the Service and click on it
- Click the + tab
- Click the "Submit passive check result" link
- Select the Check Result and type in some text for the Check Output
- Click the Submit button
NOTE: By default, passive_host_checks_are_soft=0 is set in your /usr/local/nagios/etc/nagios.cfg, this differs from services in that when you submit a passive host check result it immeditely goes into a HARD state (and should send a notification if configured to) instead of going into a SOFT state like services do. (notifications are only sent on HARD states).
For Services
----------------
Go to Home > Service Status:
- Find the Service and click on it
- Click the + tab
- Note these two rows:
State Type: Hard
Current Check: 1 of 4
Those columns tell the current State Type and the Current Check number. In order to generate a notification for a service you will need to submit MULTIPLE problem check results (the number that you need to submit is determined by the last number in the Current Check column, that is the max_check_attempts setting). For services, when you submit a passive check result, each result that you submit will be a SOFT state until you submit enough to hit the Max Check Attempts setting that you've defined on the service, only then will the service enter a HARD problem state which will generate the notification (just remember, notifications are only sent on HARD states).
- Click the "Submit passive check result" link
- Select the Check Result and type in some text for the Check Output
- Click the Submit button
- Submit as many as you need, right after another, until the service enters the HARD state so that a notification will be sent
NOTE: When coming from a HARD problem state (whether we are talking about hosts or services) if you submit an OK passive result it should fire off a recovery notification after a single passive result has been submitted.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Please go to Admin > Manage Email Settings:
- Make sure Debug Log is checked
- Click the Update Settings button
- Take a screenshot of the settings here and send it to me
Then run this tail command (and leave it running):
Code: Select all
tail -F /var/log/maillog /usr/local/nagiosxi/tmp/phpmailer.log /usr/local/nagiosxi/var/eventman.logDoes it work if you go to Admin > Manage Email Settings > Send a Test Email?
Please include all output from the screen and any errors that you receive.
----
NOTE: I'm just including this info in case you're unsure how to test
How to submit passive results for testing:
For Hosts
------------
Go to Home > Service Status:
- Find the Service and click on it
- Click the + tab
- Click the "Submit passive check result" link
- Select the Check Result and type in some text for the Check Output
- Click the Submit button
NOTE: By default, passive_host_checks_are_soft=0 is set in your /usr/local/nagios/etc/nagios.cfg, this differs from services in that when you submit a passive host check result it immeditely goes into a HARD state (and should send a notification if configured to) instead of going into a SOFT state like services do. (notifications are only sent on HARD states).
For Services
----------------
Go to Home > Service Status:
- Find the Service and click on it
- Click the + tab
- Note these two rows:
State Type: Hard
Current Check: 1 of 4
Those columns tell the current State Type and the Current Check number. In order to generate a notification for a service you will need to submit MULTIPLE problem check results (the number that you need to submit is determined by the last number in the Current Check column, that is the max_check_attempts setting). For services, when you submit a passive check result, each result that you submit will be a SOFT state until you submit enough to hit the Max Check Attempts setting that you've defined on the service, only then will the service enter a HARD problem state which will generate the notification (just remember, notifications are only sent on HARD states).
- Click the "Submit passive check result" link
- Select the Check Result and type in some text for the Check Output
- Click the Submit button
- Submit as many as you need, right after another, until the service enters the HARD state so that a notification will be sent
NOTE: When coming from a HARD problem state (whether we are talking about hosts or services) if you submit an OK passive result it should fire off a recovery notification after a single passive result has been submitted.
Re: NAgios XI email functionaity and Azure AD integration no
Hi ,
I did try to observe the logs and pfb the output.
Does it work if you go to Admin > Manage Email Settings > Send a Test Email? - NO IT DOES NOT WORK..This output is for the same..
Once I am clicking the send test mail button, Nagios UI is getting stuck and I have to restart the httpd service on the server.
Logs:
[root@oc-monitoring-test nagios-xi-prod]# tail -F /var/log/maillog /usr/local/nagiosxi/tmp/phpmailer.log /usr/local/nagiosxi/var/eventman.log
==> /var/log/maillog <==
Jan 14 07:00:02 oc-monitoring-test postfix/pickup[118657]: AF956218374D: uid=0 from=<root>
Jan 14 07:00:02 oc-monitoring-test postfix/cleanup[11113]: AF956218374D: message-id=<20190114060002.AF956218374D@oc-monitoring-test.int.opuscapita.com>
Jan 14 07:00:02 oc-monitoring-test postfix/qmgr[94974]: AF956218374D: from=<[email protected]>, size=4185, nrcpt=1 (queue active)
Jan 14 07:00:02 oc-monitoring-test postfix/smtp[11118]: AF956218374D: to=<[email protected]>, orig_to=<root>, relay=none, delay=0.11, delays=0.09/0.01/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=int.opuscapita.com type=AAAA: Host found but no data record of requested type)
Jan 14 07:00:02 oc-monitoring-test postfix/cleanup[11113]: C6C512183753: message-id=<20190114060002.C6C512183753@oc-monitoring-test.int.opuscapita.com>
Jan 14 07:00:02 oc-monitoring-test postfix/bounce[11119]: AF956218374D: sender non-delivery notification: C6C512183753
Jan 14 07:00:02 oc-monitoring-test postfix/qmgr[94974]: C6C512183753: from=<>, size=6441, nrcpt=1 (queue active)
Jan 14 07:00:02 oc-monitoring-test postfix/qmgr[94974]: AF956218374D: removed
Jan 14 07:00:02 oc-monitoring-test postfix/smtp[11118]: C6C512183753: to=<[email protected]>, relay=none, delay=0.05, delays=0.03/0/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=int.opuscapita.com type=AAAA: Host found but no data record of requested type)
Jan 14 07:00:02 oc-monitoring-test postfix/qmgr[94974]: C6C512183753: removed
==> /usr/local/nagiosxi/tmp/phpmailer.log <==
[01-14-2019 16:06:47] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:07:49] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:08:50] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:09:50] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:10:50] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:11:50] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:12:52] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:13:52] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:14:53] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:15:53] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
==> /usr/local/nagiosxi/var/eventman.log <==
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
..................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
I did try to observe the logs and pfb the output.
Does it work if you go to Admin > Manage Email Settings > Send a Test Email? - NO IT DOES NOT WORK..This output is for the same..
Once I am clicking the send test mail button, Nagios UI is getting stuck and I have to restart the httpd service on the server.
Logs:
[root@oc-monitoring-test nagios-xi-prod]# tail -F /var/log/maillog /usr/local/nagiosxi/tmp/phpmailer.log /usr/local/nagiosxi/var/eventman.log
==> /var/log/maillog <==
Jan 14 07:00:02 oc-monitoring-test postfix/pickup[118657]: AF956218374D: uid=0 from=<root>
Jan 14 07:00:02 oc-monitoring-test postfix/cleanup[11113]: AF956218374D: message-id=<20190114060002.AF956218374D@oc-monitoring-test.int.opuscapita.com>
Jan 14 07:00:02 oc-monitoring-test postfix/qmgr[94974]: AF956218374D: from=<[email protected]>, size=4185, nrcpt=1 (queue active)
Jan 14 07:00:02 oc-monitoring-test postfix/smtp[11118]: AF956218374D: to=<[email protected]>, orig_to=<root>, relay=none, delay=0.11, delays=0.09/0.01/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=int.opuscapita.com type=AAAA: Host found but no data record of requested type)
Jan 14 07:00:02 oc-monitoring-test postfix/cleanup[11113]: C6C512183753: message-id=<20190114060002.C6C512183753@oc-monitoring-test.int.opuscapita.com>
Jan 14 07:00:02 oc-monitoring-test postfix/bounce[11119]: AF956218374D: sender non-delivery notification: C6C512183753
Jan 14 07:00:02 oc-monitoring-test postfix/qmgr[94974]: C6C512183753: from=<>, size=6441, nrcpt=1 (queue active)
Jan 14 07:00:02 oc-monitoring-test postfix/qmgr[94974]: AF956218374D: removed
Jan 14 07:00:02 oc-monitoring-test postfix/smtp[11118]: C6C512183753: to=<[email protected]>, relay=none, delay=0.05, delays=0.03/0/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=int.opuscapita.com type=AAAA: Host found but no data record of requested type)
Jan 14 07:00:02 oc-monitoring-test postfix/qmgr[94974]: C6C512183753: removed
==> /usr/local/nagiosxi/tmp/phpmailer.log <==
[01-14-2019 16:06:47] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:07:49] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:08:50] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:09:50] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:10:50] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:11:50] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:12:52] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:13:52] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:14:53] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
[01-14-2019 16:15:53] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
==> /usr/local/nagiosxi/var/eventman.log <==
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
..................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
....................
PROCESSED 0 EVENTS
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NAgios XI email functionaity and Azure AD integration no
The above error looks like Nagios XI cannot make the connection to smtp.office365.com with the information provided.amit9876 wrote:Code: Select all
[01-14-2019 16:10:50] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=tls), Referer: includes/components/xicore/xicore.inc.php > Event Handler Notification Email
Re: NAgios XI email functionaity and Azure AD integration no
Hi,
Can you provide me some commands to check the smtp connection from the nagios xi server itself.
however I am successfully able to telnet on smtp.office365.com 587.
Thanks..
Can you provide me some commands to check the smtp connection from the nagios xi server itself.
however I am successfully able to telnet on smtp.office365.com 587.
Thanks..
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NAgios XI email functionaity and Azure AD integration no
Are you sure you have the correct username/password?amit9876 wrote:Hi,
Can you provide me some commands to check the smtp connection from the nagios xi server itself.
however I am successfully able to telnet on smtp.office365.com 587.
Thanks..
Re: NAgios XI email functionaity and Azure AD integration no
yes i am using correct username and password but still no luck.
whenever I am trying to send some trial mail the whole GUI is getting stuck and I have to restart the httpd service on nagiosxi server.
whenever I am trying to send some trial mail the whole GUI is getting stuck and I have to restart the httpd service on nagiosxi server.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NAgios XI email functionaity and Azure AD integration no
Hmm, are you sure there isn't something between the XI server blocking the connections to smtp.office365.com ?
Can you ping it from the CLI?
or telnet to port 587
Can you ping it from the CLI?
Code: Select all
ping smtp.office365.comCode: Select all
telnet smtp.office365.com 587Re: NAgios XI email functionaity and Azure AD integration no
Hi,
[nagios-prod@oc-monitoring-prod ~]$ telnet smtp.office365.com 587
Trying 40.101.124.194...
Connected to smtp.office365.com.
Escape character is '^]'.
[nagios-prod@oc-monitoring-prod ~]$ ping smtp.office365.com
PING DHR-efz.ms-acdc.office.com (52.97.149.82) 56(84) bytes of data.
64 bytes from 52.97.149.82 (52.97.149.82): icmp_seq=1 ttl=247 time=4.19 ms
64 bytes from 52.97.149.82 (52.97.149.82): icmp_seq=2 ttl=247 time=4.02 ms
Regards,
Amit
[nagios-prod@oc-monitoring-prod ~]$ telnet smtp.office365.com 587
Trying 40.101.124.194...
Connected to smtp.office365.com.
Escape character is '^]'.
[nagios-prod@oc-monitoring-prod ~]$ ping smtp.office365.com
PING DHR-efz.ms-acdc.office.com (52.97.149.82) 56(84) bytes of data.
64 bytes from 52.97.149.82 (52.97.149.82): icmp_seq=1 ttl=247 time=4.19 ms
64 bytes from 52.97.149.82 (52.97.149.82): icmp_seq=2 ttl=247 time=4.02 ms
Regards,
Amit
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NAgios XI email functionaity and Azure AD integration no
Hello ThriVikram,
This is likely an authentication issue. Please check the SMTP login and password to make sure there are no special characters in the password, and check if the SMTP server is set with the correct security and port numbers.
You can take a look at the phpmailer.log file to see what the output says.
Head to the "Manage Email Settings" and click on Debug Log then update your settings.
Under , edit line 329 to show
Send a test email and see the output on the top of the web UI. It should be a lengthy output but towards the end, it will give you an SMTP error such as
This is likely an authentication issue. Please check the SMTP login and password to make sure there are no special characters in the password, and check if the SMTP server is set with the correct security and port numbers.
You can take a look at the phpmailer.log file to see what the output says.
Head to the "Manage Email Settings" and click on Debug Log then update your settings.
Under
Code: Select all
/usr/local/nagiosxi/html/includes/phpmailer/class.phpmailer.phpCode: Select all
public $SMTPDebug = 2Code: Select all
SMTP ERROR: Password command failed: 535 Incorrect authentication data 2018-08-08 20:38:48 SMTP Error: Could not authenticate.