About NagiosXI mail log

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
davide.bonicelli
Posts: 134
Joined: Thu Feb 13, 2014 5:12 am

About NagiosXI mail log

Post by davide.bonicelli »

hi, it's seem that a nagiosxi has alerted for a problem but the mail is disapperead.
Is there a way to see a log?
In mail setting we use SMTP.
I see there are a lot of error like this

Code: Select all

SMTP Error: Data not accepted.<p>SMTP server error: </p>
 (method=smtp;host=62.108.227.13;port=25;smtpauth=true;security=none)
in /usr/local/nagiosxi/tmp/phpmailer.log but there isn't any date..
is it possible to aumente the verbosity if this is the correct log?
Thanks
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: About NagiosXI mail log

Post by vtrac »

Hi davide.bonicelli,
Could you please try sending a test notification email?
Nagios XI GUI > Admin > Email Settings > Click "Send a Test Email"

You can check the log below for issue:

Code: Select all

/usr/local/nagiosxi/tmp/phpmailer.log
Additionally, turn on "debug" for PHPmailer by following the article below:
https://support.nagios.com/kb/article.php?id=820
This will provide more error output to the screen, please post a screenshot of the output when sending the test email.

Best Regards,
Vinh
davide.bonicelli
Posts: 134
Joined: Thu Feb 13, 2014 5:12 am

Re: About NagiosXI mail log

Post by davide.bonicelli »

thanks vtrac, the test is always working but i need to undestand why sometimes (very rarely) some mails are missing..
i enable the debug but it's only for email test procedure, correct?
beacuse in
/usr/local/nagiosxi/tmp/phpmailer.log
i still see the errors without the date
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: About NagiosXI mail log

Post by vtrac »

Hi davide.bonicelli,
Was this just happened recently?
Were there any system/OS updated recently as well?

Yes, I noticed that your "phpmailer.log" did not have the date listed.
Are there php modules missing or old? .... (not sure).

Below is an example of my "phpmailer.log":

Code: Select all

[12-07-2020 13:13:57] SMTP Error: The following recipients failed: [email protected]: relay not permitted
 (method=smtp;host=smtp.fusemail.net;port=587;security=tls), Referer: admin/testemail.php
First, which version of PHP are you using?
To check, type:

Code: Select all

# php --version
Also, please try (running) getting "timezone" settings in php.ini file and current date (below).

Code: Select all

# php -r "echo date_default_timezone_get();"
# php -r " echo date('Y-m-d H:i:s');"
# php -r " echo gmdate('Y-m-d H:i:s');"
Standard Log Locations can be found in a few different places (below).
Please check those logs and see if there is any issues that might have stood out ... like missing php modules (for example):

Code: Select all

• /usr/local/nagios/var
• /usr/local/nagiosxi/tmp
• /usr/local/nagiosxi/var
• /var/lib
• /var/log

/usr/local/nagios/var/nagios.log
The Nagios Core log, includes checks, notifications, external commands, and events.
This file is rotated daily into the /usr/local/nagios/var/archives folder
To further investigate the issue, could you please send me the profile.zip and the exact name of the host and services sending notications.

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share in a private message or upload it to the post/ticket, and then reply to this post to bring it up in the queue.
davide.bonicelli
Posts: 134
Joined: Thu Feb 13, 2014 5:12 am

Re: About NagiosXI mail log

Post by davide.bonicelli »

hi, here's the result of the commands:
php --version
PHP 5.3.3 (cli) (built: Nov 1 2019 12:35:32)
php -r "echo date_default_timezone_get();"
Europe/Rome
php -r " echo date('Y-m-d H:i:s');"
2020-12-10 10:56:16
php -r " echo gmdate('Y-m-d H:i:s');"
2020-12-10 09:56:27
i had just sent a pm with the profile.
i don't know what are the hosts/services with missing mails...
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: About NagiosXI mail log

Post by vtrac »

Hi davide.bonicelli,
Thanks for uploading your "profile.zip" file.
The issue you are having was related to using the older version of phpmailer running on a very old Nagios XI (2014R2.6) release.

I have confirmed with my teammate that older phpmailer version do not displays date inside the phpmailer.log file.

I also noticed that your system is CentOS 6.10, which is now EOL (End Of Life).

Here are my suggestions:
1. Spin up a new test environment running either CentOS 7.x or 8.x.
2. Install Nagios XI with same current version (2014R2.6) you have today.
3. Create the backup of Nagios XI (old CentOS 6.10)
4. Restore that backup onto the new test environment.
Backing-Up-And-Restoring-Nagios-XI
5. Upgrade Nagios XI to the latest on that new test environment.
Upgrade Tips
XI-Upgrade-Instructions

Hope this helps!!

Vinh
davide.bonicelli
Posts: 134
Joined: Thu Feb 13, 2014 5:12 am

Re: About NagiosXI mail log

Post by davide.bonicelli »

yeah, i already know that both centos and nagios are pretty old but it's a particular condition.
is it not possible to upgrade only the php module?
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: About NagiosXI mail log

Post by vtrac »

Hi davide.bonicelli,
Unfortunately, upgrade just phpmailer did not work.

I have tested this out by creating a new CentOS 6.8 VM with Nagios XI 2014R2.6.
I updated phpmail to v5.2.7 but my "Sent Test Email" failed.

Sorry!!

Best Regards,
Vinh
davide.bonicelli
Posts: 134
Joined: Thu Feb 13, 2014 5:12 am

Re: About NagiosXI mail log

Post by davide.bonicelli »

thanks for the effort!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: About NagiosXI mail log

Post by benjaminsmith »

Hi @davide.bonicelli

May we close out this thread? Please let us know.
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!
Locked