Issues/questions with version 2R1.0

This support forum board is for support questions relating to Nagios Network Analyzer, our network traffic and bandwidth analysis solution.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Issues/questions with version 2R1.0

Post by snapon_admin »

That file? No, I haven't deleted anything. Should I?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Issues/questions with version 2R1.0

Post by ssax »

Yes, delete the file and try to run the report again.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Issues/questions with version 2R1.0

Post by snapon_admin »

Ok, so doing that gets it to work. The weird thing is that the report works fine now with http and https, but if i re-add the RewriteRule to force ssl (a requirement of our infosec team) then it doesn't work again. If I don't force ssl using the RewriteRule, but I use ssl the report works, so I'm not sure why it works with ssl but not if I force ssl. Unless the URL for the report just says it's https when it's not.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Issues/questions with version 2R1.0

Post by ssax »

For a test leave the RewriteRule commented out but uncomment SSLRequireSSL in /etc/httpd/conf.d/nagiosna.conf and restart apache and try it with the SSL address.

I'll take a look at the rewrite rule to see if I'm missing something.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Issues/questions with version 2R1.0

Post by snapon_admin »

Ok, so yeah it definitely looks like with the RewriteRule off the report is NOT using ssl, even though the URL says it is. I tried a couple of different ways of doing this and this is what I got:

RewriteRule OFF, SSLRequireSSL OFF, manually typing https:// into the URL = report generates fine, https:// remains in URL for the report.

RewriteRule OFF, SSLRequireSSL ON, trying to navigate to http:// URL results in Forbidden error as expected = report also reports that connection to 127.0.0.1 on port 80 is forbidden.

So what I think is happening is that the PDF simply is not working with ssl, which is why the RewriteRule breaks it since that is redirecting the non ssl link to an ssl one. SSLRequireSSL doesn't actually redirect anything it simply disallows access on port 80, which also breaks the report but in a different way. So the report only seems to work without ssl.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Issues/questions with version 2R1.0

Post by ssax »

Ok, I figured it out, I have a solution for you but I will have to submit a bug report to development.

Enable the rewrite rule, I would still personally keep SSLRequireSSL uncommented in /etc/httpd/conf.d/nagiosna.conf for better security but it's not required to force SSL, the rewrite rule will do that.

You need to modify the file below:

Code: Select all

/var/www/html/nagiosna/application/controllers/dashboard.php
On line 109 change:

Code: Select all

$url = 'http://127.0.0.1/nagiosna/index.php';
To:

Code: Select all

$url = 'https://127.0.0.1/nagiosna/index.php';
For good measure:

Code: Select all

rm -f /tmp/page.pdf
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Issues/questions with version 2R1.0

Post by snapon_admin »

Nice! That got it! SSLRequireSSL is on as is the RewriteRule and the report comes up fine. Phew, thanks for all your help on this. So, looking back at the issues in the OP it looks like we have:

Still broken:
  • The strange error that seems to think that 24 hours is longer than 4 weeks: still getting this issue on all our sources. Doesn't seem to affect anything negatively other than being inaccurate so not overly critical.
  • Reset zoom button is missing: still not there, but refreshing the page is an adequate workaround for now so it's also not really critical.
Fixed:
  • Pie graphs not showing hostnames: looks like this was already fixed so we'll just keep an eye out for the patch to fix this.
  • Can't generate PDFs: fixed using the fix from that last post.
  • AD authentication: fixed. Still not sure what fixed this, but it's working great now so meh.
Thanks again for the quick response on these, btw. I've never needed one, but examples like this are the kinds of examples I would use if I ever needed to justify renewing support to my bosses.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Issues/questions with version 2R1.0

Post by lmiltchev »

Our developers will be checking the "24 hours is longer than 4 weeks" as this is a possible bug. Let us know if it is safe to lock this topic.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Issues/questions with version 2R1.0

Post by snapon_admin »

Yep, I'd say it's safe to locker her up. Thanks again for addressing these so quick!
Locked