Page 1 of 1

Download and Email Report not working

Posted: Thu Oct 25, 2018 8:59 pm
by tpwebb
Hello

We have recently done some work on our offline Nagios system recently to try to get more security and use from our system.

I had a problem recently to do with the reports when we were at 5.5.3 that could download the reports but the emails were corrupted. This was resolved.

We upgraded it to use SSL with our own windows CA. I have followed the instructions given and eventually had success. Main issue to this for me was with Google Chrome needing an alternate subject name, I thought this had been removed from the latest version, but no.

I have recently upgraded to 5.5.5 and done the yum updates to ensure it is current.

My current problem is to do with reports again, I am finding the downloaded reports are showing up as per the availability pdf attached and the email reports are corrupted.

Thanks
Terry

Re: Download and Email Report not working

Posted: Fri Oct 26, 2018 11:13 am
by npolovenko
Hello, @tpwebb. This looks like a possible SSL misconfiguration.
Try running the first command on the terminal while generating the avaliability report PDF in the GUI. Copy all the errors to this forum thread. Then repeat the same with the second command.
tail -f /var/log/httpd/error_log
tail -f /var/log/httpd/ssl_error_log
Also, please check the external URL under Admin/System settings in XI.

Re: Download and Email Report not working

Posted: Sun Oct 28, 2018 7:52 pm
by tpwebb
Hello @npolovenko

Thanks for your reply

I have attached the availability report in the attachments, after trying to sort out any SSL issues found in the logs I now get a 'Session Timeout' error on the emails and the download of the reports.

Running the report with tail -f /var/log/httpd/error_log

Code: Select all

[root@nagios ~]# tail -f /var/log/httpd/error_log
[Sun Oct 28 03:49:07 2018] [notice] Digest: generating secret for digest authentication ...
[Sun Oct 28 03:49:07 2018] [notice] Digest: done
[Sun Oct 28 03:49:08 2018] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
--2018-10-29 10:39:42--  https://nagios.metrotraffic.seq.its/nagiosxi//reports/availability.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&token=2e103ed158cc262685a82afd65ccf5edb3638ca8
Resolving nagios.metrotraffic.seq.its... ::1, 127.0.0.1
Connecting to nagios.metrotraffic.seq.its|::1|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5720 (5.6K) [application/pdf]
Saving to: "/usr/local/nagiosxi/tmp/scheduledreport-tpwebb-ieYAv8arg93n-Availability_Report.pdf"

     0K .....                                                 100% 53.6M=0s

2018-10-29 10:39:48 (53.6 MB/s) - "/usr/local/nagiosxi/tmp/scheduledreport-tpwebb-ieYAv8arg93n-Availability_Report.pdf" saved [5720/5720]


Running the report with tail -f /var/log/httpd/ssl_error_log

Nothing showed up

Re: Download and Email Report not working

Posted: Mon Oct 29, 2018 9:46 am
by npolovenko
@tpwebb, Please open the /etc/php.ini and double the session.gc_maxlifetime value. Then run:
service httpd restart
In XI web interface go to the Admin menu, then click on System Settings in the left column, click on the Security tab and make sure that:
Keep session alive while interface is open, even if user is inactive.
Is checked and also double the "Session Timeout" value.

Let me know if this fixes your problem.

Re: Download and Email Report not working

Posted: Tue Oct 30, 2018 10:57 pm
by tpwebb
Hello

I have increased session.gc_maxlifetime value to 2880
restarted httpd
increased the session timeout value to 60
checked that 'keep session alive while interface is open, even if the user is inactive' is ticked

Still no joy,

Re: Download and Email Report not working

Posted: Wed Oct 31, 2018 12:03 pm
by npolovenko
@tpwebb, Please go to the Admin menu in XI, then click on System Settings in the left column and make sure the the program URL and external URL fields are filled out.
Please go over this tutorial to make sure SSL is configured correctly:
https://assets.nagios.com/downloads/nag ... s%20XI.pdf
Are you able to see reports normally in the web interface?

Re: Download and Email Report not working

Posted: Thu Nov 01, 2018 12:57 am
by tpwebb
The internal and external are matching. I had the second blank as there is no external web address but have now made them matching.

It was these instructions that I followed and have checked this again, as far as I can see it is working.

I have also noticed that the downloaded graphs in png format are getting cropped.

I have changed the setting for the internal web page to http and now I am getting the default home page so I must have something wrong, unsure.

Thanks

Re: Download and Email Report not working

Posted: Thu Nov 01, 2018 10:08 am
by npolovenko
@tpwebb, Please open the following file in a text editor:
/usr/local/nagiosxi/html/config.inc.php
And add the following option:
$cfg['old_browser_compat'] = 1;
You can change the URL back to HTTPS.

Let me know if this gets the reports to work.

Re: Download and Email Report not working

Posted: Thu Nov 08, 2018 9:18 pm
by tpwebb
this looked like it worked.

Thanks
Terry

Re: Download and Email Report not working

Posted: Fri Nov 09, 2018 10:43 am
by lmiltchev
Great! @tpwebb, let us know if it is safe to close this thread. Thank you!