Page 1 of 2

Reports fail to download as PDF

Posted: Thu Sep 24, 2020 5:03 am
by IkaIka
Hello! My colleague is having some problems with generating availability reports in XI. The avail.cgi process is single-threaded, it pegs one of the CPU cores on our XI server, takes forever to generate a yearly report, freezes the session for the user generating the report and when it's finally done, we sometimes get a permission error when trying to save the report as PDF.

Is there any way to improve this process? Allowing avail.cgi to use more than a single CPU core would definitely speed things up.

Re: Reports fail to download as PDF

Posted: Thu Sep 24, 2020 3:08 pm
by benjaminsmith
Hi,
Is there any way to improve this process? Allowing avail.cgi to use more than a single CPU core would definitely speed things up.
Not sure which version you are using, but we have made changes to both the XI and Core to help speed up the report. Let me know.

Have you increased the default PHP settings to allow for more memory, execution time, and input variables?

Nagios XI - Optimizing The PHP Settings File

We also are planning improvements to the report system in general Nagiox XI 6.

https://www.nagios.com/roadmaps/

If you do not have a test server in your environment, before upgrading, verify you have both a valid system or image backup as well as a configuration backup of Nagios XI before continuing! More information about backing up and restoring Nagios XI can be found here:

Backing Up And Restoring Your Nagios XI System


Benjamin

Re: Reports fail to download as PDF

Posted: Fri Sep 25, 2020 8:54 am
by IkaIka
Thank you and sorry for not including version information. I was meant to do it at the end of my entry and forgot to do so, of course. Our XI version is 5.6.12 running on Centos 7.

As for the tweaks to PHP settings, I probably won't have time to do this this today, I'll do my best to try it next week.

Re: Reports fail to download as PDF

Posted: Fri Sep 25, 2020 3:57 pm
by benjaminsmith
Hi,
As for the tweaks to PHP settings, I probably won't have time to do this this today, I'll do my best to try it next week.
Sounds good. We'll keep this thread open and just update us when you have a chance.

Thanks!
Benjamin

Re: Reports fail to download as PDF

Posted: Wed Sep 30, 2020 9:57 am
by IkaIka
Okay, I checked our PHP settings and all of them are at or above the values recommended here. What's really weird to me about this is that I can download reports for some hostgroups without a problem, while others generate and display fine (if a little slow) but when trying to download them as PDF I get a document containing nothing but "ERROR: You are not authorized to view this report."

Re: Reports fail to download as PDF

Posted: Wed Sep 30, 2020 5:25 pm
by benjaminsmith
Hi,

That sounds like a user permission issue, if you login to the server using the nagiosadmin account, does it show the same error?

Next, If you go to the Admin > Manage User menu and edit one of the users, what are the security settings set to? Can you post a screenshot to test them out.
user-perms.png
--Benjamin

Re: Reports fail to download as PDF

Posted: Thu Oct 01, 2020 5:56 am
by IkaIka
Adding the permissions for the user experiencing the problem unfortunately didn't change anything. I also tried with a user that has full admin permissions and got the same error.

Re: Reports fail to download as PDF

Posted: Thu Oct 01, 2020 5:22 pm
by benjaminsmith
Hi,

If you are logged in as the admin and still getting the error, that rules any permissions issues here. I'd like to get a system profile to take a closer look at the settings and logs.

Please run the following tail command, download the report and then post the full output to the thread.

Code: Select all

tail -f /var/log/httpd/error_log /var/log/httpd/ssl_error_log
Please follow the bottom of the kb article below to check your Program URL and make sure that it is set correctly.

Nagios XI - Troubleshooting Reports

Lastly, PM a system profile. Thanks, Benjamin

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: Reports fail to download as PDF

Posted: Mon Oct 05, 2020 7:02 am
by IkaIka
I generated a report (it displayed correctly), ran the command and clicked Download -> PDF. The PDF contained only the permissions error message. Pasting the output I got.

Code: Select all

# tail -f /var/log/httpd/error_log /var/log/httpd/ssl_error_log
==> /var/log/httpd/error_log <==
Loading headers and footers (5/6)
Printing pages (6/6)
Done
Loading pages (1/6)
Warning: SSL error ignored
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done

==> /var/log/httpd/ssl_error_log <==
[Mon Oct 05 13:55:40.130391 2020] [:error] [pid 11295] [client 10.3.18.113:9383] PHP Deprecated:  Function eregi() is deprecated in /usr/local/nagios/share/pnp/include/function.inc.php on line 1553, referer: https://10.65.4.14/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=WAN_Links
[Mon Oct 05 13:55:40.130397 2020] [:error] [pid 11295] [client 10.3.18.113:9383] PHP Deprecated:  Function eregi() is deprecated in /usr/local/nagios/share/pnp/include/function.inc.php on line 1553, referer: https://10.65.4.14/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=WAN_Links
[Mon Oct 05 13:55:40.130403 2020] [:error] [pid 11295] [client 10.3.18.113:9383] PHP Deprecated:  Function eregi() is deprecated in /usr/local/nagios/share/pnp/include/function.inc.php on line 1553, referer: https://10.65.4.14/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=WAN_Links
[Mon Oct 05 13:55:40.130409 2020] [:error] [pid 11295] [client 10.3.18.113:9383] PHP Deprecated:  Function eregi() is deprecated in /usr/local/nagios/share/pnp/include/function.inc.php on line 1553, referer: https://10.65.4.14/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=WAN_Links
[Mon Oct 05 13:55:40.130415 2020] [:error] [pid 11295] [client 10.3.18.113:9383] PHP Deprecated:  Function eregi() is deprecated in /usr/local/nagios/share/pnp/include/function.inc.php on line 1553, referer: https://10.65.4.14/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=WAN_Links
[Mon Oct 05 13:55:40.130421 2020] [:error] [pid 11295] [client 10.3.18.113:9383] PHP Deprecated:  Function eregi() is deprecated in /usr/local/nagios/share/pnp/include/function.inc.php on line 1553, referer: https://10.65.4.14/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=WAN_Links
[Mon Oct 05 13:55:40.130426 2020] [:error] [pid 11295] [client 10.3.18.113:9383] PHP Deprecated:  Function eregi() is deprecated in /usr/local/nagios/share/pnp/include/function.inc.php on line 1553, referer: https://10.65.4.14/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=WAN_Links
[Mon Oct 05 13:55:40.130432 2020] [:error] [pid 11295] [client 10.3.18.113:9383] PHP Deprecated:  Function eregi() is deprecated in /usr/local/nagios/share/pnp/include/function.inc.php on line 1553, referer: https://10.65.4.14/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=WAN_Links
[Mon Oct 05 13:55:40.130437 2020] [:error] [pid 11295] [client 10.3.18.113:9383] PHP Deprecated:  Function eregi() is deprecated in /usr/local/nagios/share/pnp/include/function.inc.php on line 1553, referer: https://10.65.4.14/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=WAN_Links
[Mon Oct 05 13:55:40.130443 2020] [:error] [pid 11295] [client 10.3.18.113:9383] PHP Deprecated:  Function eregi() is deprecated in /usr/local/nagios/share/pnp/include/function.inc.php on line 1553, referer: https://10.65.4.14/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=WAN_Links

==> /var/log/httpd/error_log <==
Loading pages (1/6)
Warning: SSL error ignored
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
^C
You have mail in /var/spool/mail/root
It's worth noting that the report generates and downloads okay for most hostgroups and only some specific ones lead to this error manifesting itself.

Re: Reports fail to download as PDF

Posted: Tue Oct 06, 2020 1:22 pm
by ssax
What version of XI are you running?

Please PM me a copy of your profile, you can download it from Admin > System Profile by clicking the Download Profile button.

Depending on your XI version there may be some speed fixes available for the availability/SLA reports (if you're not on XI 5.7+ already).

Please send me the exact settings that you are choosing for the report (include all advanced options) so I can walk the code and see what it's hitting.

Let us know the exact hostgroup name and the exact user you're testing with so we can hone in on those configs.

Thank you!