emailed report pdfs corrupted

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ks6764
Posts: 58
Joined: Thu Aug 20, 2015 10:42 am

Re: emailed report pdfs corrupted

Post by ks6764 »

:roll: 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.
ks6764
Posts: 58
Joined: Thu Aug 20, 2015 10:42 am

Re: emailed report pdfs corrupted

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: emailed report pdfs corrupted

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
ks6764
Posts: 58
Joined: Thu Aug 20, 2015 10:42 am

Re: emailed report pdfs corrupted

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: emailed report pdfs corrupted

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ks6764
Posts: 58
Joined: Thu Aug 20, 2015 10:42 am

Re: emailed report pdfs corrupted

Post 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 ?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: emailed report pdfs corrupted

Post by tgriep »

Sorry, the files that need to be edited are protected by Sourceguardian so you cannot edit them.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ks6764
Posts: 58
Joined: Thu Aug 20, 2015 10:42 am

Re: emailed report pdfs corrupted

Post 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 ?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: emailed report pdfs corrupted

Post by scottwilkerson »

If you go to Admin -> System Settings
what do you have in the

Code: Select all

Program URL:
External URL:
fields?

Do they contain the proper 8443 port?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ks6764
Posts: 58
Joined: Thu Aug 20, 2015 10:42 am

Re: emailed report pdfs corrupted

Post 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.
Locked