emailed report pdfs corrupted

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: emailed report pdfs corrupted

Post by tgriep »

The attachments are created on the fly so there is not a copy left on the server. If they were, they would be empty.
I did file a bug fix for this and to reference it, you would use this ID number 12337.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: emailed report pdfs corrupted

Post by jomann »

ks6764 wrote:As I think I mentioned previously, the attachment is zero bytes. Even if I change it to a text extension and attempt to open it, it has absolutely nothing in it, no messages, nothing at all.
I just reran the report to email it to myself again and captured the following from the error_log. I changed the hostname and IP address below for security reasons.

Code: Select all

--2017-08-10 11:52:09--  https://myfullyqualfied.server.name/nagiosxi//reports/execsummary.php?reportperiod=last24hours&startdate=&enddate=&host=&service=&hostgroup=&servicegroup=&advanced=0&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringdowntime=yes&includesoftstates=no&assumedhoststate=3&assumedservicestate=6&timeperiod=&locale=en_US&mode=pdf

Resolving myfullyqualfied.server.name (fullyqualfied.server.name)... 123.456.xxx.xxx

Connecting to myfullyqualfied.server.name (myfullyqualfied.server.name)|123.456.xxx.xxx|:443... connected.

OpenSSL: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Unable to establish SSL connection.
As for your question about a proxy server. Under the Admin/System Config/Proxy Configuration link I do have a proxy listed there which was needed to allow me to run the "Check for Updates" button located under the "Manage Components" section.
What you posted above is what needs to be able to be grabbed from the internal code. On a cron, it runs a command that does this:

Code: Select all

wget --no-check-certificate -O <filename> '<url>'
Where the url is the URL you provided above. Are you able to use the above URL in wget in your command line?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ks6764
Posts: 58
Joined: Thu Aug 20, 2015 10:42 am

Re: emailed report pdfs corrupted

Post by ks6764 »

We ran the following as a test.

Code: Select all

/usr/bin/wkhtmltopdf --footer-spacing 3 --margin-bottom 15mm --footer-font-size 9 --footer-right "Page [page] of [toPage]" --footer-left "2017-08-11 15:17:56" --header-left "test" 'https://ourserver/nagiosxi//reports/availability.php?&username=ourid&ticket=pSm4YsRcvGWbMG9qXvQcsdI5JT2BCA42JKlXcd90SlrU2Dkf8qrTGpeGigdUPAcO&locale=en_US' '/usr/local/nagiosxi/tmp/scheduledreport-ourid-PMqqsP-test.pdf'
The above should be configurable so that we can include port number 8443 in the https line.
We ran the above manually like follows:

Code: Select all

/usr/bin/wkhtmltopdf --footer-spacing 3 --margin-bottom 15mm --footer-font-size 9 --footer-right "Page [page] of [toPage]" --footer-left "2017-08-11 15:17:56" --header-left "test" '">https://blph952.bhdc.>;
/usr/bin/wkhtmltopdf --footer-spacing 3 --margin-bottom 15mm --footer-font-size 9 --footer-right "Page [page] of [toPage]" --footer-left "2017-08-11 15:17:56" --header-left "test" 'https://ourserver:8443/nagiosxi//reports/availability.php?&username=ourid&ticket=pSm4YsRcvGWbMG9qXvQcsdI5JT2BCA42JKlXcd90SlrU2Dkf8qrTGpeGigdUPAcO&locale=en_US' '/usr/local/nagiosxi/tmp/scheduledreport-ourid-PMqqsP-test.pdf'
Note in the above how we included the port, when running the above we got the following output which would create the pdf. Without the port, the pdf ended up empty.

Loading pages (1/6)
Warning: SSL error ignored
Warning: SSL error ignored
Warning: SSL error ignored
Warning: SSL error ignored
Warning: SSL error ignored
Warning: SSL error ignored
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done

So I will be looking forward to the bug fix on this. Any ETA as to when we can expect a fix ? Our executives like the reporting function, but also want us to be using https/SSL and following company guidelines of course by using the 8443 port.

Thx.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: emailed report pdfs corrupted

Post by tgriep »

Sorry, there is not an ETA on when this will be fixed as the schedule is changing but hopefully the next release will include it.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked