Problems when I need to generate the reports in PDF

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Problems when I need to generate the reports in PDF

Post by npolovenko »

@novisnagios, Can you try generating the availability report in PDF instead? And tail the error log:

Code: Select all

tail -f /var/log/httpd/*error*
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
novisnagios
Posts: 14
Joined: Fri Jul 20, 2018 4:30 pm

Re: Problems when I need to generate the reports in PDF

Post by novisnagios »

This is the log output when executing the report
==> /var/log/httpd/error_log <==
[Wed Jun 05 10:29:47 2019] [error] [client 172.27.114.52] PHP Notice: Call made to exac_sql_query() when DB handler does not exist\n#0 exec_sql_query(nagiosxi, SELECT * FROM xi_options WHERE name='wc_display', ) called at [/usr/local/nagiosxi/html/includes/utils.inc.php:1033]\n#1 get_option(wc_display, 0) called at [/usr/local/nagiosxi/html/includes/components/capacityplanning/includes/capacityreport.js.php:187]\n in /usr/local/nagiosxi/html/includes/db.inc.php on line 511, referer: http://10.161.176.67/nagiosxi/includes/ ... anning.php
[Wed Jun 05 10:30:11 2019] [error] [client 172.27.114.52] PHP Notice: Call made to exac_sql_query() when DB handler does not exist\n#0 exec_sql_query(nagiosxi, SELECT * FROM xi_options WHERE name='wc_display', ) called at [/usr/local/nagiosxi/html/includes/utils.inc.php:1033]\n#1 get_option(wc_display, 0) called at [/usr/local/nagiosxi/html/includes/components/capacityplanning/includes/capacityreport.js.php:187]\n in /usr/local/nagiosxi/html/includes/db.inc.php on line 511, referer: http://10.161.176.67/nagiosxi/includes/ ... s&manual=1
Loading pages (1/6)
[Wed Jun 05 10:30:46 2019] [error] [client 127.0.0.1] PHP Notice: Call made to exac_sql_query() when DB handler does not exist\n#0 exec_sql_query(nagiosxi, SELECT * FROM xi_options WHERE name='wc_display', ) called at [/usr/local/nagiosxi/html/includes/utils.inc.php:1033]\n#1 get_option(wc_display, 0) called at [/usr/local/nagiosxi/html/includes/components/capacityplanning/includes/capacityreport.js.php:187]\n in /usr/local/nagiosxi/html/includes/db.inc.php on line 511, referer: http://localhost/nagiosxi/includes/comp ... r_compat=1
=================================================> ] 88%
==> /var/log/httpd/ssl_error_log <==
[Wed Jun 05 10:37:53 2019] [error] [client 10.161.156.25] File does not exist: /usr/local/nagiosxi/html/includes/js/jquery/jquery-1.11.2.min.js, referer: https://monitor.noviscorp.cl/

==> /var/log/httpd/error_log <==
[Wed Jun 05 10:38:05 2019] [error] [client 172.27.200.29] File does not exist: /usr/local/nagiosxi/html/includes/js/jquery/jquery-1.11.2.min.js, referer: http://nagios.servicio.novis.com/
novisnagios
Posts: 14
Joined: Fri Jul 20, 2018 4:30 pm

Re: Problems when I need to generate the reports in PDF

Post by novisnagios »

Any idea of the problem, I do not understand what can be

can you help me please
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems when I need to generate the reports in PDF

Post by scottwilkerson »

novisnagios wrote:When generating individual reports of the servers these are generated without problems, but when generating a report of some hostgroup or several servers in only one, the PDF conversion ends with errors. There is some solution.
It is possible that you are hitting a limit with the php max_execution_time if you are hitting the limit when trying to run a report over a whole hostgroup because it takes quite some time to create the capacity planning report in general, but with the PDF report there isn't a page limit so it could be creating TONS of graphs, and this will take a lot of time
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
novisnagios
Posts: 14
Joined: Fri Jul 20, 2018 4:30 pm

Re: Problems when I need to generate the reports in PDF

Post by novisnagios »

scottwilkerson wrote:
novisnagios wrote:When generating individual reports of the servers these are generated without problems, but when generating a report of some hostgroup or several servers in only one, the PDF conversion ends with errors. There is some solution.
It is possible that you are hitting a limit with the php max_execution_time if you are hitting the limit when trying to run a report over a whole hostgroup because it takes quite some time to create the capacity planning report in general, but with the PDF report there isn't a page limit so it could be creating TONS of graphs, and this will take a lot of time
This change was already suggested in another comment, which does not work.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems when I need to generate the reports in PDF

Post by scottwilkerson »

Does it load in the page but not in the PDF report, or not in the page either?

Can you run the following

Code: Select all

tail -f /var/log/httpd/error_log
then try to send the report and send back all the output from the outputted logging

Also, 5.6.3 came out this morning that I know is supposed to fix one of the notices you were getting in your logs before.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
novisnagios
Posts: 14
Joined: Fri Jul 20, 2018 4:30 pm

Re: Problems when I need to generate the reports in PDF

Post by novisnagios »

scottwilkerson wrote:Does it load in the page but not in the PDF report, or not in the page either?

Can you run the following

Code: Select all

tail -f /var/log/httpd/error_log
then try to send the report and send back all the output from the outputted logging

Also, 5.6.3 came out this morning that I know is supposed to fix one of the notices you were getting in your logs before.

The report is generated on the web but when downloaded in pdf this process does not work and remains loaded.

The messages are the same as they appear in a previous post

I'm going to review the new version
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Problems when I need to generate the reports in PDF

Post by npolovenko »

@novisnagios, What's the output of:

Code: Select all

rpm -qa | grep wkhtmltox
Also, please run the following commands:

Code: Select all

touch /usr/local/nagiosxi/var/wkhtmltox.log
chmod 777 /usr/local/nagiosxi/var/wkhtmltox.log
Then tail the wkhtmltox.log and leave the command running:

Code: Select all

tail -f /usr/local/nagiosxi/var/wkhtmltox.log
Open the web interface and generate a PDF report for a host group or multiple hosts. When you see an error in the GUI, take a look at the tail command and copy-paste all errors that it produced.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
novisnagios
Posts: 14
Joined: Fri Jul 20, 2018 4:30 pm

Re: Problems when I need to generate the reports in PDF

Post by novisnagios »

npolovenko wrote:@novisnagios, What's the output of:

Code: Select all

rpm -qa | grep wkhtmltox
[root@nvsplmonnagvt01 ~]# rpm -qa | grep wkhtmltox
wkhtmltox-0.12.5-1.centos6.x86_64

npolovenko wrote:Also, please run the following commands:

Code: Select all

touch /usr/local/nagiosxi/var/wkhtmltox.log
chmod 777 /usr/local/nagiosxi/var/wkhtmltox.log
npolovenko wrote:Then tail the wkhtmltox.log and leave the command running:

Code: Select all

tail -f /usr/local/nagiosxi/var/wkhtmltox.log
[root@nvsplmonnagvt01 ~]# touch /usr/local/nagiosxi/var/wkhtmltox.log
[root@nvsplmonnagvt01 ~]# chmod 777 /usr/local/nagiosxi/var/wkhtmltox.log
[root@nvsplmonnagvt01 ~]# tail -f /usr/local/nagiosxi/var/wkhtmltox.log
http://localhost/nagiosxi/includes/comp ... r_compat=1
--lowquality --no-outline --footer-spacing 3 --margin-bottom 15mm --footer-font-size 9 --footer-right "Page [page] of [toPage]" --footer-left "2019-06-12 10:56:12" -O landscape --no-stop-slow-scripts
Loading pages (1/6)
Counting pages (2/6)
[============================================================] Object 1 of 1

npolovenko wrote:Open the web interface and generate a PDF report for a host group or multiple hosts. When you see an error in the GUI, take a look at the tail command and copy-paste all errors that it produced.
in the GUI it stays loading and does not end, it does not indicate any message. After a long time I must kill the process to release my session.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Problems when I need to generate the reports in PDF

Post by npolovenko »

@novisnagios, How much ram do you have on this server? Please double the memory_limit in the /etc/php.ini file and restart the apache with:

Code: Select all

service httpd restart
From the command like run the "top" command and then generate a PDF report from the GUI. Let me know what the system load looks like. Take a screenshot of the command output if you can.

If you have google chrome, right click on the stuck webpage and from the drop-down list select "Inspect". First, click on the Console tab and see if there are any errors. Next, go to the network tab and take a screenshot of top time-consuming queries.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked