Our monthly scheduled reports ( email with pdf attachement) had a lot of data missing as in not fitting on the page.
It looks like the pdf's are now (Nagios XI 5.2.0) rendered in landscape mode (property of pdf shows page size: 11,69 x 8,26 in.) where as in the previous version of Nagios XI (2014R2.4) the pdf's were rendered in portrait mode (property of pdf shows page size: 8,26 x 11,69 in.).
The pdf's rendered in 5.2.0 are displayed in portrait mode.
To reproduce it, run the availability report using a service with a very long servicename. the produced report looks fine, then click on download to pdf in the upper right corner.
The resulting pdf will be shown in portrait mode, but the rendered data (look at the Service Data section) will disappear on the right side of the paper where the long servicename is used.
Kind Regards,
Hans Blom
exporting a report to pdf rendered incrorrectly in 5.2.0
exporting a report to pdf rendered incrorrectly in 5.2.0
You do not have the required permissions to view the files attached to this post.
Re: exporting a report to pdf rendered incrorrectly in 5.2.0
I was able to reproduce this. If you use spaces instead of underscores for the service description, it looks like it will render properly. I can put in a bug report, but I can't promise how much traction it will get, as it could possibly be an issue in wkhtmltopdf.
Bug report 6842 submitted.
Bug report 6842 submitted.
Former Nagios Employee.
me.
me.
Re: exporting a report to pdf rendered incrorrectly in 5.2.0
Ok, thanks. I'll replace the the spaces with underscores and see if it will give me a workaround.
Just to be sure, in the properties of the created pdf I've got the following info:
2014R2.4:
Application: wkhtmltopdf 0.12.1-c22928d
PDF Poducer: Qt 4.8.6
PDF Version 1.4 (Acrobat 5.x)
5.2.0:
Application: wkhtmltopdf 0.12.1-c22928d
PDF Poducer: Qt 4.8.6
PDF Version 1.4 (Acrobat 5.x)
Regards...Hans
Just to be sure, in the properties of the created pdf I've got the following info:
2014R2.4:
Application: wkhtmltopdf 0.12.1-c22928d
PDF Poducer: Qt 4.8.6
PDF Version 1.4 (Acrobat 5.x)
5.2.0:
Application: wkhtmltopdf 0.12.1-c22928d
PDF Poducer: Qt 4.8.6
PDF Version 1.4 (Acrobat 5.x)
Regards...Hans
Re: exporting a report to pdf rendered incrorrectly in 5.2.0
Hmmm, I should read a little closer
, I took a service with a long name and replaced the underscore with spaces. Correct! The service description will be neatly wrapped.
So to confirm the issue and to see where I should put in the spaces, I created a host named 0123456789 and a service named 01234567890123456789012345678901234567890123456789 (50 characters no underscores). When I run the availability report, it info will shift of the paper (example_50char_service.pdf).
Next I added a white space after 30 characters and I also added the original service that caused the problem. I added some spaces and obfuscated 39 characters of info with I's (example_39char_I_service.pdf). All looks well.
Last I ran the same report as the previous report, but I changed the 39 I's with 39 X's. Same number of characters, but they use more space/pixels. And here it runs of the paper again (example_39char_X_service.pdf).
So indeed adding a white space every bit of length will indeed work as workaround, but I do hope it will get fixed though
Greetings,
Hans
(Ah, pdf extension not allowed as upload, I'll just do a screenshot then)
So to confirm the issue and to see where I should put in the spaces, I created a host named 0123456789 and a service named 01234567890123456789012345678901234567890123456789 (50 characters no underscores). When I run the availability report, it info will shift of the paper (example_50char_service.pdf).
Next I added a white space after 30 characters and I also added the original service that caused the problem. I added some spaces and obfuscated 39 characters of info with I's (example_39char_I_service.pdf). All looks well.
Last I ran the same report as the previous report, but I changed the 39 I's with 39 X's. Same number of characters, but they use more space/pixels. And here it runs of the paper again (example_39char_X_service.pdf).
So indeed adding a white space every bit of length will indeed work as workaround, but I do hope it will get fixed though
Greetings,
Hans
(Ah, pdf extension not allowed as upload, I'll just do a screenshot then)
You do not have the required permissions to view the files attached to this post.
Re: exporting a report to pdf rendered incrorrectly in 5.2.0
Hi CBoekhuis,
I don't have great news regarding the bug report. I was told that it will break too many things if they enforce any type of limit, or change in the functionality of it. Here is the answer that I got:
I don't have great news regarding the bug report. I was told that it will break too many things if they enforce any type of limit, or change in the functionality of it. Here is the answer that I got:
I wish I had a better answer for you, but if it breaks more than it fixes, I have to stand by what the developers said.They can add this CSS to their base.css stylesheet in /usr/local/nagiosxi/html/includes/css/base.css but they will need to do this themselves. We won't be adding this since it breaks lots of things. They should be able to add a - or a space and it will break on those.
table.table td { word-break: break-all; }
Former Nagios Employee.
me.
me.
Re: exporting a report to pdf rendered incrorrectly in 5.2.0
Hi hsmith,
That's not good news indeed. I agree that manually editing the base.css is not the way to go. However that means we now have to go through +4300 service descriptions and change them until the reports look good again (and mend all the rrd files as not to lose the historical data).
I had a long thought about my reply because I don't want to sound harsh nor end up in a lengthy discussion, but in retrospective of the 5.2.0 upgrade I would like to point out that scheduled reports is a key feature of the Enterprise License which we use to send out reports to customers and management. I hope you understand that I'm rather disappointed.
As for now, can you close this thread?
Regards,
Hans Blom
That's not good news indeed. I agree that manually editing the base.css is not the way to go. However that means we now have to go through +4300 service descriptions and change them until the reports look good again (and mend all the rrd files as not to lose the historical data).
I had a long thought about my reply because I don't want to sound harsh nor end up in a lengthy discussion, but in retrospective of the 5.2.0 upgrade I would like to point out that scheduled reports is a key feature of the Enterprise License which we use to send out reports to customers and management. I hope you understand that I'm rather disappointed.
As for now, can you close this thread?
Regards,
Hans Blom