I installed Google Chrome and updated /usr/local/nagiosxi/html/includes/utils-reports-export.inc.php, with mixed results.
When running a report manually and saving as PDF, the file wants to save as an html file.
If I add the .pdf extension, I get the following message, "You have used the extension “.pdf” at the end of the name. The standard extension is “.html”."
If I choose to change to PDF, I get an error using Edge and Chrome,
Using Edge: Couldn't download - No file.
Using Chrome: File wasn't available on site.
I get the same error if I simply try to download as an html file.
However, I was able to receive a report via email, as a PDF, successfully.
Thanks...John
PDF Reports are not generating in new Nagios XI Instance
Re: PDF Reports are not generating in new Nagios XI Instance
Thanks for the update John,
I will pass along the difficulties you are having, so our developer can take a look.
I will pass along the difficulties you are having, so our developer can take a look.
Please let us know if you have any other questions or concerns.
-Laura
-Laura
Re: PDF Reports are not generating in new Nagios XI Instance
Hi John,
I'm looking into this but I'm not seeing what you're describing on my system. Did you install the google-chrome-stable package mentioned in this thread?
viewtopic.php?p=361065&sid=f866aa8c6116 ... 59#p361065
Can you advise the steps you're taking to get this PDF download? I ask because when I generate a report and click on Download, and then the "PDF" option, I get redirected to a printable PDF view of the page within the Nagios XI window, which has a print option. I can either use the print functionality to print it to a local PDF, or click the "Download" icon to directly download the pdf, but in either case I get it in .pdf format, so I'm looking to confirm we're taking the same steps.
I'm looking into this but I'm not seeing what you're describing on my system. Did you install the google-chrome-stable package mentioned in this thread?
viewtopic.php?p=361065&sid=f866aa8c6116 ... 59#p361065
Can you advise the steps you're taking to get this PDF download? I ask because when I generate a report and click on Download, and then the "PDF" option, I get redirected to a printable PDF view of the page within the Nagios XI window, which has a print option. I can either use the print functionality to print it to a local PDF, or click the "Download" icon to directly download the pdf, but in either case I get it in .pdf format, so I'm looking to confirm we're taking the same steps.
Re: PDF Reports are not generating in new Nagios XI Instance
The only difference on my end is that I installed Google Chrome using a yum repo, and I confirmed that I am running google-chrome-stable.
rpm -qa | grep google-chrome-stable
google-chrome-stable-135.0.7049.95-1.x86_64
I also confirmed that line 164 in /usr/local/nagiosxi/html/includes/utils-reports-export.inc.php line reads as,
$bin = 'google-chrome-stable --headless=new --ignore-certificate-errors --enable-low-end-device-mode --disable-gpu --no-sandbox --virtual-time-budget=10000 --run-all-compositor-stages-before-draw';
I retested both Chrome and Edge and received the same results. Trying to Save As PDF, displays the file, then when I try to save that file, it wants to save as a file called managereports, which fails to download. If I try to change to a .PDF extension, I get the following prompt , "You have used the extension “.pdf” at the end of the name. The standard extension is “.html”." If I continue to try and save as a PDF, it also fails.
HERE'S the funny thing. I have now tested Firefox and that works and the file is named correctly by default, for example, statehistory-68013fca688c5.pdf.
So this issue seems to be related to using Chrome or Edge. The only way to get it to work there is to Print and Save as PDF.
rpm -qa | grep google-chrome-stable
google-chrome-stable-135.0.7049.95-1.x86_64
I also confirmed that line 164 in /usr/local/nagiosxi/html/includes/utils-reports-export.inc.php line reads as,
$bin = 'google-chrome-stable --headless=new --ignore-certificate-errors --enable-low-end-device-mode --disable-gpu --no-sandbox --virtual-time-budget=10000 --run-all-compositor-stages-before-draw';
I retested both Chrome and Edge and received the same results. Trying to Save As PDF, displays the file, then when I try to save that file, it wants to save as a file called managereports, which fails to download. If I try to change to a .PDF extension, I get the following prompt , "You have used the extension “.pdf” at the end of the name. The standard extension is “.html”." If I continue to try and save as a PDF, it also fails.
HERE'S the funny thing. I have now tested Firefox and that works and the file is named correctly by default, for example, statehistory-68013fca688c5.pdf.
So this issue seems to be related to using Chrome or Edge. The only way to get it to work there is to Print and Save as PDF.