Page 1 of 2

About NagiosXI mail log

Posted: Thu Dec 03, 2020 11:55 am
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

Re: About NagiosXI mail log

Posted: Fri Dec 04, 2020 10:58 am
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

Re: About NagiosXI mail log

Posted: Mon Dec 07, 2020 3:46 am
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

Re: About NagiosXI mail log

Posted: Mon Dec 07, 2020 4:48 pm
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.

Re: About NagiosXI mail log

Posted: Thu Dec 10, 2020 5:07 am
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...

Re: About NagiosXI mail log

Posted: Thu Dec 10, 2020 2:59 pm
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

Re: About NagiosXI mail log

Posted: Fri Dec 11, 2020 2:48 am
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?

Re: About NagiosXI mail log

Posted: Fri Dec 11, 2020 12:24 pm
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

Re: About NagiosXI mail log

Posted: Mon Dec 14, 2020 2:42 am
by davide.bonicelli
thanks for the effort!

Re: About NagiosXI mail log

Posted: Mon Dec 14, 2020 1:50 pm
by benjaminsmith
Hi @davide.bonicelli

May we close out this thread? Please let us know.