Page 1 of 2
Not graph but letters in PDF
Posted: Wed Dec 05, 2018 10:17 am
by xdatanet
When I receive a report from Nagios I find "YTozOntzOjQ6Im5hbWUiO3M6Mzoic2xhIjtzOjU6InRpdGxlIjtzOjEwOiJTTE" letters in the place of graph in the PDF attached in the email.
In the report tab if I try to download a PDF It result correct after several download. The first time the graphs are in letters, the second time I can find only a graph and sometimes I can find the full report with graphs.
Any idea?
Regards,
Graziano.
Re: Not graph but letters in PDF
Posted: Wed Dec 05, 2018 2:17 pm
by benjaminsmith
Hi
@Graziano,
What version of Nagios are you currently using? We updated jQuery in 5.5.4, and we had some issues with reports not generating correctly,and this has been corrected. I would recommend updating to the latest version, and see if that resolves the issue.
If you're still having the issue, please run the command below while downloading the PDF and post the output for us to review. Thanks.
Code: Select all
tail -f /var/log/httpd/error_log /var/log/httpd/ssl_error_log
Re: Not graph but letters in PDF
Posted: Thu Dec 06, 2018 2:29 am
by xdatanet
I have version 5.5.7.
The output is:
Code: Select all
Warning: SSL error ignored
Warning: SSL error ignored
Error: Failed to load https://localhost/nagiosxi/includes/fonts/fontawesome-webfont.woff?v=4.7.0, with network status code 99 and http status code 0 - Unknown error
Counting pages (2/6)
Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
Exit with code 1 due to network error: UnknownNetworkError
==> /var/log/httpd/ssl_error_log <==
[Wed Dec 05 16:10:16 2018] [error] [client 127.0.0.1] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0
[Wed Dec 05 16:10:16 2018] [error] [client 127.0.0.1] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0
[Wed Dec 05 16:10:36 2018] [error] [client 127.0.0.1] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0
[Wed Dec 05 16:10:36 2018] [error] [client 127.0.0.1] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0
[Wed Dec 05 16:11:02 2018] [error] [client 127.0.0.1] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0
[Wed Dec 05 16:11:02 2018] [error] [client 127.0.0.1] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0
[Wed Dec 05 16:11:28 2018] [error] [client 127.0.0.1] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0
[Wed Dec 05 16:11:28 2018] [error] [client 127.0.0.1] PHP Notice: Undefined variable: logo_alt in /usr/local/nagiosxi/html/reports/sla.php on line 0
[Thu Dec 06 08:24:42 2018] [error] [client 192.168.3.44] PHP Notice: Undefined offset: 5 in /usr/local/nagiosxi/html/includes/components/ldap_ad_integration/basicLDAP.php on line 101, referer: https://nagiosxi.xdatanet.com/nagiosxi/login.php
[Thu Dec 06 08:24:48 2018] [error] [client 192.168.3.44] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/local/nagiosxi/html/dashboards/dashboard.php on line 0, referer: https://nagiosxi.xdatanet.com/nagiosxi/dashboards/
Regards,
Graziano.
Re: Not graph but letters in PDF
Posted: Thu Dec 06, 2018 12:56 pm
by benjaminsmith
Hi Graziano,
It looks like the library we use to generate PDF's is timing out due to a slow network.
Code: Select all
Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
Exit with code 1 due to network error: UnknownNetworkError
Can you test/verify your network connection?
Also, what operating system are you using?
Re: Not graph but letters in PDF
Posted: Fri Dec 07, 2018 2:45 am
by xdatanet
I see that is a problem of delay. Sometimes the report is built completely. But the NagiosXI VM doesn't have any network problem. It's very fast, on SSD disks and on Gigabit Network. This must be a bug in the code. I found other post about this problem on other projects and the solution was delay the rendering.
In attachment a clear example that the report doesn't wait the pdf rendering.
CentOS 6.3.
Re: Not graph but letters in PDF
Posted: Fri Dec 07, 2018 10:33 am
by benjaminsmith
Hi
@xdatanet,
I'm going to discuss the delay settings with development. In the meantime, could you let me know how many hosts and services you have across your network and the type(s) of report that is failing. It would be helpful for us to know approximately how much data is being queried to create that report.
Thank you.
Re: Not graph but letters in PDF
Posted: Fri Dec 07, 2018 11:32 am
by benjaminsmith
Hello xdatanet,
After going over this one our developer, it looks like an issue with SSL and not necessarily the delay settings. If if were timing out, you'd normally get a blank report.
Please let us know what version of wkhtmltopdf you are using:
You'll need version .12.1.3 in order for the system to work properly with SSL. We've experience issues like this other versions.
Re: Not graph but letters in PDF
Posted: Mon Dec 10, 2018 2:27 am
by xdatanet
wkhtmltopdf 0.12.5 (with patched qt)
Do I need to change it?
Regards,
Graziano.
Re: Not graph but letters in PDF
Posted: Mon Dec 10, 2018 2:46 am
by xdatanet
I've changed the version to downgraded suggested 12.1.3 and it works.
Thanks.
Regards,
Graziano.
Re: Not graph but letters in PDF
Posted: Mon Dec 10, 2018 10:14 am
by benjaminsmith
Hello Graziano,
Thanks for letting us know it's working now. Did you have any other questions or is ok for us to close this post?