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.
novisnagios
Posts: 14
Joined: Fri Jul 20, 2018 4:30 pm

Problems when I need to generate the reports in PDF

Post by novisnagios »

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.
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 »

Hello, @novisnagios. I'd like to try to replicate this issue in the lab. What is the version of XI you're running? How many hosts and services are monitored? What errors do you see when XI fails to generate a PDF?
Also, let's increase limits in the /etc/php.ini file.
https://support.nagios.com/kb/article/n ... e-611.html
For max_input_vars use 50000, for memory_limit use 512M, max_execution_time 180, max_input_time 180.
Save the /etc/php.ini file and restart the apache service with:

Code: Select all

service httpd restart
Let me know if these changes resolve the issue.
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:Hello, @novisnagios. I'd like to try to replicate this issue in the lab. What is the version of XI you're running? How many hosts and services are monitored? What errors do you see when XI fails to generate a PDF?
Also, let's increase limits in the /etc/php.ini file.
https://support.nagios.com/kb/article/n ... e-611.html
For max_input_vars use 50000, for memory_limit use 512M, max_execution_time 180, max_input_time 180.
Save the /etc/php.ini file and restart the apache service with:

Code: Select all

service httpd restart
Let me know if these changes resolve the issue.

I'm going to test the increase of the variables in php.ini

There are currently 750 Hosts and 8700 Services

Nagios XI 5.6.2

regards
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, Sounds good. Also, while you're generating a report in GUI run this from the command line:

Code: Select all

tail -f /var/log/httpd/*error*
Leave this command running and it should show errors in the command line.
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 »

These errors occur during the conversion to PDF

[error] [client 172.27.114.243] 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.117/nagiosxi/includes ... anning.php

[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




Saludos
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, This seems like a database related problem. Can you PM me your system profile so I could take a look at the database log and some other related logs?

Code: Select all

Could you send in your Nagios XI System Profile so I can review it?
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 send it to me in a private message.
After you PM me the profile, please post something in this thread to bring it up in the support queue.
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 »

Send profile by PM


regards
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, Please run this query first to repair the DB:

Code: Select all

mysqlcheck -r -f -uroot -pnagiosxi --all-databases --use_frm
Then see if the reports are failing again.

Can you also show me the output of these commands?

Code: Select all

ls -l /usr/local/nagiosxi/html/includes/js/jquery/

 echo "SELECT * FROM xi_options WHERE name='wc_display';" | mysql -u root -pnagiosxi nagiosxi
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 »

[root@nvsplmonnagvt01 ~]# ls -l /usr/local/nagiosxi/html/includes/js/jquery/
total 728
drwxr-xr-x 5 nagios nagios 4096 Apr 25 2017 colorpicker
drwxr-xr-x 3 nagios nagios 4096 Apr 25 2017 css
-rwxr-xr-- 1 nagios nagios 97162 May 23 10:48 jquery-1.12.4.min.js
-rwxr-xr-- 1 nagios nagios 86927 May 23 10:48 jquery-3.3.1.min.js
-rw-r--r-- 1 nagios nagios 13341 May 23 10:48 jquery.autocomplete.js
-rw-r--r-- 1 nagios nagios 1701 May 23 10:48 jquery.bgiframe.pack.js
-rw-r--r-- 1 nagios nagios 4110 May 23 10:48 jquery.checkboxes.js
-rw-r--r-- 1 nagios nagios 20216 May 23 10:48 jquery.colorBlend.js
-rw-r--r-- 1 nagios nagios 759 May 23 10:48 jquery.inview.min.js
-rw-r--r-- 1 nagios nagios 14360 May 23 10:48 jquery.jscrollpane.min.js
-rw-r--r-- 1 nagios nagios 5191 May 23 10:48 jquery.maphilight.min.js
-rw-r--r-- 1 nagios nagios 1292 May 23 10:48 jquery.metadata.min.js
-rw-r--r-- 1 nagios nagios 9909 May 23 10:48 jquery-migrate-1.4.1.min.js
-rwxr-xr-- 1 nagios nagios 6974 May 23 10:48 jquery-migrate-3.0.0.min.js
-rw-r--r-- 1 nagios nagios 2235 May 23 10:48 jquery.mousewheel.js
-rw-r--r-- 1 nagios nagios 24279 May 23 10:48 jquery.searchabledropdown.custom.js
-rw-r--r-- 1 nagios nagios 34908 Aug 8 2017 jquery.sparkline.js
-rw-r--r-- 1 nagios nagios 11780 May 23 10:48 jquery.sumoselect.min.js
-rw-r--r-- 1 nagios nagios 23366 May 23 10:48 jquery.tablesorter.js
-rw-r--r-- 1 nagios nagios 3894 May 23 10:48 jquery.tablesorter.pager.js
-rw-r--r-- 1 nagios nagios 3367 May 23 10:48 jquery.timers-1.1.3.js
-rwxr-xr-- 1 nagios nagios 253668 May 23 10:48 jquery-ui-1.12.1.custom.min.js
-rw-r--r-- 1 nagios nagios 78771 May 23 10:48 jquery-ui-timepicker-addon.js

[root@nvsplmonnagvt01 ~]# echo "SELECT * FROM xi_options WHERE name='wc_display';" | mysql -u root -pnagiosxi nagiosxi
option_id name value
58 wc_display 1
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 »

report generate the same error again
Locked