Download and Email Report not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tpwebb
Posts: 70
Joined: Thu Sep 01, 2016 2:21 am

Download and Email Report not working

Post 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
You do not have the required permissions to view the files attached to this post.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Download and Email Report not working

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tpwebb
Posts: 70
Joined: Thu Sep 01, 2016 2:21 am

Re: Download and Email Report not working

Post 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
You do not have the required permissions to view the files attached to this post.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Download and Email Report not working

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tpwebb
Posts: 70
Joined: Thu Sep 01, 2016 2:21 am

Re: Download and Email Report not working

Post 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,
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Download and Email Report not working

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tpwebb
Posts: 70
Joined: Thu Sep 01, 2016 2:21 am

Re: Download and Email Report not working

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Download and Email Report not working

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tpwebb
Posts: 70
Joined: Thu Sep 01, 2016 2:21 am

Re: Download and Email Report not working

Post by tpwebb »

this looked like it worked.

Thanks
Terry
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Download and Email Report not working

Post by lmiltchev »

Great! @tpwebb, let us know if it is safe to close this thread. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked