Page 1 of 2

Empty reports attached to mail

Posted: Mon May 10, 2021 5:16 am
by ancert
Hi,
We have problems with scheduled reports in Nagios XI. We have scheduled some reports that will attach the result in XLS and PDF, but the attached files are received empty.

We see that "External URL" is completed in "Admin"-"System Settings". Also, we have reviewed /var/log/maillog and seems correct.

What can we do to solve it?

Re: Empty reports attached to mail

Posted: Mon May 10, 2021 2:27 pm
by gsmith
Hi

Please create a System Profile and send it to me and I'll take a look:

To send us your system profile.
1. Login to the Nagios XI GUI using a web browser.
2. Click the "Admin" > "System Profile" Menu
3. Click the "Download Profile" button
4. Save the profile.zip file and share this in a private message and then reply to this post to bring it up in the queue.

Thanks

Re: Empty reports attached to mail

Posted: Tue May 11, 2021 8:59 am
by ancert
gsmith wrote:Hi

Please create a System Profile and send it to me and I'll take a look:

To send us your system profile.
1. Login to the Nagios XI GUI using a web browser.
2. Click the "Admin" > "System Profile" Menu
3. Click the "Download Profile" button
4. Save the profile.zip file and share this in a private message and then reply to this post to bring it up in the queue.

Thanks

Done, thank you very much.

Re: Empty reports attached to mail

Posted: Thu May 13, 2021 9:11 am
by ancert
Hi,

We go to "Apply Configuration" but none problem with servicegroups is reported.

We review our servicegroups and see 5 without any relation with any service, then we have disbled it and apply configuration, but the result is the same.

Best regards.

Re: Empty reports attached to mail

Posted: Thu May 13, 2021 10:24 am
by gsmith
Hi

Please send me a new System Profile - I'd like to re-import it after the changes you made.

To send us your system profile.
1. Login to the Nagios XI GUI using a web browser.
2. Click the "Admin" > "System Profile" Menu
3. Click the "Download Profile" button
4. Save the profile.zip file and share this in a private message and then reply to this post to bring it up in the queue.

Thanks

Re: Empty reports attached to mail

Posted: Thu May 13, 2021 11:09 am
by gsmith
Hi

Please do the following:

1. check/edit the /etc/php.ini file:
memory_limit - should be at least 1024M
max_execution_time - should be at least 300

2. edit the /usr/local/nagiosxi/html/config.inc.php file:
change from: $cfg['use_https'] = false;
to: $cfg['use_https'] = true;

add "charset" => "utf8"under each DB section

// DB-specific connection information
$cfg['db_info'] = array(
"nagiosxi" => array(
"dbtype" => 'mysql',
"dbserver" => '',
"user" => 'nagiosxi',
"pwd" => 'n@gweb',
"db" => 'nagiosxi',
"charset" => "utf8",

"ndoutils" => array(
"dbtype" => 'mysql',
"dbserver" => 'localhost',
"user" => 'ndoutils',
"pwd" => 'n@gweb',
"db" => 'nagios',
"charset" => "utf8",

"nagiosql" => array(
"dbtype" => 'mysql',
"dbserver" => 'localhost',
"user" => 'nagiosql',
"pwd" => 'n@gweb',
"db" => 'nagiosql',
"charset" => "utf8",


Thanks

Re: Empty reports attached to mail

Posted: Fri May 14, 2021 3:45 am
by ancert
Hi,

We have applied these changes, but still the same, the reports received from email are empty.

We send you another profile.

Re: Empty reports attached to mail

Posted: Fri May 14, 2021 2:05 pm
by gsmith
Hi

After making changes to the php files did you restart the httpd service?

use: systemctl restart httpd

My bad - I didn't tell you to do this.

Thanks

Re: Empty reports attached to mail

Posted: Mon May 17, 2021 2:09 am
by ancert
Hi,

We have restarted the httpd service, also nagios service, but still the same result.

Reviewing error_log file, a certificate error is happen, but seems not be the problem.

Re: Empty reports attached to mail

Posted: Mon May 17, 2021 10:46 am
by gsmith
Hi,

Does the file get created on the server? Can you open it from the server to see if it is
a valid pdf?
Image1.jpg
Thanks