Page 1 of 1

PDF and JPG Report issues

Posted: Tue Jan 12, 2021 12:57 pm
by mjkellerii
I am having issues creating PDF and JPG reports. I get the error below when I attempt to download either PDF or JPG. I they are emailed the files are corrupt and will not open. I have the Program URL set to http://FQDN/nagiosxi. I have tried using https: in the Program URL. I have replaced the FQDN with the IP address also with no luck. I have added the IP address in the hosts file. Nagios 5.7.5 deployed using OVF...


***********************************************************************
Failed to create PDF
Verify that your Nagios XI server can connect to the URL:
http://localhost/nagiosxi/reports/avail ... r_compat=1

Re: PDF and JPG Report issues

Posted: Tue Jan 12, 2021 2:51 pm
by mjkellerii
It appears that CSV files are empty also - other than the headers ...

Re: PDF and JPG Report issues

Posted: Wed Jan 13, 2021 1:05 pm
by benjaminsmith
Hi @mjkellerii,

Thank you for trying out Nagios XI. For some reason, it looks like it's not able to connect internally as needed to generate a report. Do you have any type of proxy server configured?

Let's run through a few tests to help troubleshoot the issue.

1. Can you provide a screenshot of the Program URL settings.

2. What is the output of the following command?

Code: Select all

/usr/bin/wkhtmltopdf -V
3. Let's run the following tail command then try to download a report and post the full output to the ticket.

Code: Select all

tail -f /var/log/httpd/error_log /var/log/httpd/ssl_error_log
4. Lastly please PM a system profile as well. 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

Re: PDF and JPG Report issues

Posted: Wed Jan 13, 2021 2:05 pm
by mjkellerii
Thank you for your reply...answers below...

1. Screenshot attached - there was originally no setting in the external URL. I have also tried with the IP instead of the FQDN in the Program URL field alone and in both fields.

2.

Code: Select all

wkhtmltopdf 0.12.1.3 (with patched qt)
3. Looks like no new output...

Code: Select all

==> /var/log/httpd/error_log <==
Saving to: '/usr/local/nagiosxi/tmp/scheduledreport-MKeller-jsJEenvONAEv-1610475419-Service_Availability.csv'

     0K                                                       100% 7.12M=0s

2021-01-12 13:16:59 (7.12 MB/s) - '/usr/local/nagiosxi/tmp/scheduledreport-MKeller-jsJEenvONAEv-1610475419-Service_Availability.csv' saved [49/49]

Loading pages (1/6)
Loading page (1/2)=====================================>     ] 90%
Loading pages (1/6)====================================>     ] 90%
[======================================================>     ] 90%
==> /var/log/httpd/ssl_error_log <==
[Wed Jan 13 12:03:29.726301 2021] [:error] [pid 30992] [client 10.240.18.10:52009] PHP Notice:  Undefined index: val in /usr/local/nagiosxi/html/includes/configwizards/snmpwalk/snmpwalk.inc.php on line 719, referer: https://nagios.datanetworks.com/nagiosxi/config/monitoringwizard.php
[Wed Jan 13 12:03:29.726323 2021] [:error] [pid 30992] [client 10.240.18.10:52009] PHP Notice:  Undefined index: name in /usr/local/nagiosxi/html/includes/configwizards/snmpwalk/snmpwalk.inc.php on line 722, referer: https://nagios.datanetworks.com/nagiosxi/config/monitoringwizard.php
[Wed Jan 13 12:03:29.726355 2021] [:error] [pid 30992] [client 10.240.18.10:52009] PHP Notice:  Undefined index: label in /usr/local/nagiosxi/html/includes/configwizards/snmpwalk/snmpwalk.inc.php on line 723, referer: https://nagios.datanetworks.com/nagiosxi/config/monitoringwizard.php
[Wed Jan 13 12:03:29.726377 2021] [:error] [pid 30992] [client 10.240.18.10:52009] PHP Notice:  Undefined index: units in /usr/local/nagiosxi/html/includes/configwizards/snmpwalk/snmpwalk.inc.php on line 724, referer: https://nagios.datanetworks.com/nagiosxi/config/monitoringwizard.php
[Wed Jan 13 12:03:29.726432 2021] [:error] [pid 30992] [client 10.240.18.10:52009] PHP Notice:  Undefined index: matchtype in /usr/local/nagiosxi/html/includes/configwizards/snmpwalk/snmpwalk.inc.php on line 728, referer: https://nagios.datanetworks.com/nagiosxi/config/monitoringwizard.php
[Wed Jan 13 12:03:29.726464 2021] [:error] [pid 30992] [client 10.240.18.10:52009] PHP Notice:  Undefined index: matchtype in /usr/local/nagiosxi/html/includes/configwizards/snmpwalk/snmpwalk.inc.php on line 729, referer: https://nagios.datanetworks.com/nagiosxi/config/monitoringwizard.php
[Wed Jan 13 12:03:29.726490 2021] [:error] [pid 30992] [client 10.240.18.10:52009] PHP Notice:  Undefined index: matchtype in /usr/local/nagiosxi/html/includes/configwizards/snmpwalk/snmpwalk.inc.php on line 730, referer: https://nagios.datanetworks.com/nagiosxi/config/monitoringwizard.php
[Wed Jan 13 12:03:29.727272 2021] [:error] [pid 30992] [client 10.240.18.10:52009] PHP Notice:  Undefined index: warning in /usr/local/nagiosxi/html/includes/configwizards/snmpwalk/snmpwalk.inc.php on line 738, referer: https://nagios.datanetworks.com/nagiosxi/config/monitoringwizard.php
[Wed Jan 13 12:03:29.728042 2021] [:error] [pid 30992] [client 10.240.18.10:52009] PHP Notice:  Undefined index: critical in /usr/local/nagiosxi/html/includes/configwizards/snmpwalk/snmpwalk.inc.php on line 742, referer: https://nagios.datanetworks.com/nagiosxi/config/monitoringwizard.php
[Wed Jan 13 12:03:29.728076 2021] [:error] [pid 30992] [client 10.240.18.10:52009] PHP Notice:  Undefined index: string in /usr/local/nagiosxi/html/includes/configwizards/snmpwalk/snmpwalk.inc.php on line 745, referer: https://nagios.datanetworks.com/nagiosxi/config/monitoringwizard.php
All the above issue were from previous experimentation. The CSV you can see downloaded on contained headers - no actual data.

PM'ing the system profile...

Re: PDF and JPG Report issues

Posted: Thu Jan 14, 2021 3:48 pm
by benjaminsmith
Hi @mjkellerii,

Thanks for the profile. We just release Nagios XI 5.8 which has some important updates, I would recommend updating this system for best performance.

https://assets.nagios.com/downloads/nag ... ctions.pdf

Next, please follow the steps in the KB article below to optimize the PHP settings, and then try to download a PDF from the reports area. Star with the minium of data ( say 24 hour report) and let me know the results. If it fails, can you attach the failed PDF report to the thread?

https://support.nagios.com/kb/article/n ... e-611.html

Benjamin

Re: PDF and JPG Report issues

Posted: Thu Jan 14, 2021 3:59 pm
by mjkellerii
OK. Actually already tried the update to 5.8 - this fixed "most" of the problem. I can now download the PDF and JPG without corruption - but data is missing. There are no graphics (pie charts) in PDF or JPG and the host data is missing when I apply report to a host group. CSV files are still headers only. I was actually wondering about PHP settings. Give me a couple days...scheduled out of the office today and tomorrow. I'll give it a shot and post back.

Re: PDF and JPG Report issues

Posted: Fri Jan 15, 2021 2:07 pm
by benjaminsmith
Hi,
Give me a couple days...scheduled out of the office today and tomorrow. I'll give it a shot and post back.
Sounds like it may be timing out, try to increase those settings as suggested in the article. If it keeps failing, please upload the PDF so we can look inside for any more error messages.

Thanks, Benjamin

Re: PDF and JPG Report issues

Posted: Mon Jan 18, 2021 7:01 am
by mjkellerii
Pictures in the PDF and JPG are appearing now after adjusting php.ini - however there is still no host data (hostnames and service names) in downloaded or emailed PDF or JPG. Pics show all zeros as percentages. The data does appear on screen in the web UI. CSV files still have only headers.

Still no errors output to http error logs.

PDF attached.

EDIT: BTW - updated to 5.8.1 also. AND added CPU and memory in the VM...

Re: PDF and JPG Report issues

Posted: Tue Jan 19, 2021 5:00 pm
by benjaminsmith
Hi @mjkellerii,

Thanks for sending over a copy of the report. Given that this isn't a large system, I'm not sure why this is not completing. Now that you have upgraded to Nagios XI 5.8.1, let's increase the delay settings on the report to give it more time.

Go to Admin > System Config > Performance Settings, and try increasing the default delay (for example 600 )and then test the report once more.
report-delay.png
If the issue persists, let's get a ticket opened for this as we may need to do a remote session to further troubleshoot.

To open a ticket go to:
https://support.nagios.com/tickets/

and reference this thread.

Thanks,
Benjamin