Page 2 of 3
Re: emailed report pdfs corrupted
Posted: Wed Aug 09, 2017 4:55 pm
by ks6764

sigh...no luck. The email shows up, attachment on the email. Attachment is corrupt. Link in the email will take you to the report in the gui.
Re: emailed report pdfs corrupted
Posted: Wed Aug 09, 2017 6:19 pm
by ks6764
I can access an existing Nagios report and click on the "Download" button in the upper right corner and on the resulting page in the menu bar save the pdf to my desktop which I can then open with no issue.
The problem seems to still be with the emailing of the reports.
Re: emailed report pdfs corrupted
Posted: Thu Aug 10, 2017 9:17 am
by tgriep
If the attachment is in the email, try opening it up with a text editor and see if there is an error message and post it here so we can view it.
When the report is run, it uses a backend call to the Apache server and I think it is still using port 443 which is blocked on your server and not the 8443 port.
Also, to verify this, you can look at the Apache log files in the /var/log/httpd folder at the time the report was run.
One question, is the server setup to use a proxy server?
Re: emailed report pdfs corrupted
Posted: Thu Aug 10, 2017 12:03 pm
by ks6764
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.
Re: emailed report pdfs corrupted
Posted: Thu Aug 10, 2017 1:33 pm
by tgriep
I was able to run some tests and I found that when the scheduled report runs in the background to create the attachment, it is not using the External URL settings from the Admin > System Settings page.
When SSL is enabled, it defaults to port 443 but on your server, that is not functional so the attachment it not created.
For now, the only workaround is to go back to port 443.
Re: emailed report pdfs corrupted
Posted: Fri Aug 11, 2017 11:26 am
by ks6764
Our company does not allow the use of port 443 for SSL, we have to use 8443 for SSL.
Can you identify the conf or php file that controls the creation of the reports so that we can modify it to use 8443 instead of 443 ?
Re: emailed report pdfs corrupted
Posted: Fri Aug 11, 2017 1:19 pm
by tgriep
Sorry, the files that need to be edited are protected by Sourceguardian so you cannot edit them.
Re: emailed report pdfs corrupted
Posted: Fri Aug 11, 2017 2:07 pm
by ks6764
Do scheduled reports get stored anywhere on the server that I may be able to pick them up and email them using a cronjob on the server itself ?
Re: emailed report pdfs corrupted
Posted: Fri Aug 11, 2017 2:22 pm
by scottwilkerson
If you go to Admin -> System Settings
what do you have in the
fields?
Do they contain the proper 8443 port?
Re: emailed report pdfs corrupted
Posted: Fri Aug 11, 2017 2:30 pm
by ks6764
Yes, that has been covered already in this thread.
I use the
Code: Select all
https://myfullyqualifedhost:8443/nagiosxi/
and have put this in both the program url and the external url. No change, still get email with a pdf report with no contents in it. Same if choosing csv or jpg options for the report.