Nagios 4.1.1 Statusmap problem

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios 4.1.1 Statusmap problem

Post by hsmith »

I can get Debian spun up here in a bit and test vs. that. I don't think testing vs. Server 2012 is going to be the most "common use" type scenario. We're pretty busy today, so as a disclaimer I may not have this until tomorrow morning again. I do want to get to the bottom of this. And to make 100% sure, you're also es_AR on Debian correct?
Former Nagios Employee.
me.
DanielB
Posts: 77
Joined: Sun Aug 17, 2014 2:17 pm

Re: Nagios 4.1.1 Statusmap problem

Post by DanielB »

Hi, Holden.
hsmith wrote:I can get Debian spun up here in a bit and test vs. that. I don't think testing vs. Server 2012 is going to be the most "common use" type scenario. We're pretty busy today, so as a disclaimer I may not have this until tomorrow morning again. I do want to get to the bottom of this. And to make 100% sure, you're also es_AR on Debian correct?
It would be great if you could do some testing with Debian. Yes, I'm using Debian Jessie in the Nagios server and in my notebook for working (where I did the tests with the three browsers mentioned in this thread). Both hosts have es_AR.UTF-8 as locale setting. Really appreciate your time.

I would also like to get to the bottom of this. I do not get along with the mysteries :) I will try to think what other tests I can doing.

Thanks again!

Best regards,
Daniel
whitest
Posts: 107
Joined: Tue Dec 30, 2014 8:16 am

Re: Nagios 4.1.1 Statusmap problem

Post by whitest »

jfrickson wrote:
whitest wrote:New map is not worked. I see following messages in error.log:

Code: Select all

[Mon Sep 21 21:39:54 2015] [error] [client 10.14.2.220] script not found or unable to stat: /var/www/cgi-bin/statusjson.cgi, referer: http://nagios.domain.local/map.html?host=all
[Mon Sep 21 21:39:54 2015] [error] [client 10.14.2.220] script not found or unable to stat: /var/www/cgi-bin/statusjson.cgi, referer: http://nagios.domain.local/map.html?host=all
[Mon Sep 21 21:39:54 2015] [error] [client 10.14.2.220] script not found or unable to stat: /var/www/cgi-bin/objectjson.cgi, referer: http://nagios.domain.local/map.html?host=all
The ScriptAlias is for /nagios/cgi-bin but map.html is not under nagios, so the server is looking for the JSON CGI's in the normal cgi-bin directory. If I understand correctly you probably need to add a ScriptAlias /cgi-bin /usr/local/nagios/sbin to your config.
When I rollback ScriptAlias in httpd.conf to its default value (ScriptAlias /cgi-bin "/var/www/cgi-bin/") and add the following alias /cgi-bin under alies /nagios/cgi-bin in nagios.conf:

Code: Select all

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
ScriptAlias /cgi-bin "/usr/local/nagios/sbin"
I recieve WARNING after restart apache:

Code: Select all

Starting httpd: [Tue Sep 22 08:48:27 2015] [warn] The ScriptAlias directive in /etc/httpd/conf/httpd.conf at line 565 will probably never match because it overlaps an earlier ScriptAlias.
Can you tell me how to configure nagios properly for virtual hosting? I have mrtg page on the nagios server.

---

The Second question is why all hosts that have two parents have been displayed on the map twice (see examples in attach)?
Attachments
map-topology.jpg
jfrickson

Re: Nagios 4.1.1 Statusmap problem

Post by jfrickson »

whitest wrote:When I rollback ScriptAlias in httpd.conf to its default value (ScriptAlias /cgi-bin "/var/www/cgi-bin/") and add the following alias /cgi-bin under alies /nagios/cgi-bin in nagios.conf:

Code: Select all

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
ScriptAlias /cgi-bin "/usr/local/nagios/sbin"
I recieve WARNING after restart apache:

Code: Select all

Starting httpd: [Tue Sep 22 08:48:27 2015] [warn] The ScriptAlias directive in /etc/httpd/conf/httpd.conf at line 565 will probably never match because it overlaps an earlier ScriptAlias.
A warning doesn't necessarily mean it won't work. The question is, did it work?
whitest wrote:The Second question is why all hosts that have two parents have been displayed on the map twice (see examples in attach)?
That's a known problem. The D3 library used for the new maps doesn't handle multiple parents well at all. https://github.com/NagiosEnterprises/na ... /issues/34
whitest
Posts: 107
Joined: Tue Dec 30, 2014 8:16 am

Re: Nagios 4.1.1 Statusmap problem

Post by whitest »

jfrickson wrote:
whitest wrote:When I rollback ScriptAlias in httpd.conf to its default value (ScriptAlias /cgi-bin "/var/www/cgi-bin/") and add the following alias /cgi-bin under alies /nagios/cgi-bin in nagios.conf:

Code: Select all

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
ScriptAlias /cgi-bin "/usr/local/nagios/sbin"
I recieve WARNING after restart apache:

Code: Select all

Starting httpd: [Tue Sep 22 08:48:27 2015] [warn] The ScriptAlias directive in /etc/httpd/conf/httpd.conf at line 565 will probably never match because it overlaps an earlier ScriptAlias.
A warning doesn't necessarily mean it won't work. The question is, did it work?

MRTG graphs doesn't work because ScriptAlias /cgi-bin in httpd.conf overlaped with ScriptAlias /cgi-bin in nagios.conf:

Code: Select all

[Tue Sep 22 17:13:58 2015] [error] [client 10.14.2.220] script not found or unable to stat: /usr/local/nagios/sbin/14all.cgi, referer: http://nagios.domain.local/mrtg/c2960-48-c2/
Of course I understand that I can just copy 14all.cgi to /usr/local/nagios/sbin/, but I believe that Nagios web-scripts must use own ScriptAlias directive as it was before.
jfrickson

Re: Nagios 4.1.1 Statusmap problem

Post by jfrickson »

whitest wrote:MRTG graphs doesn't work because ScriptAlias /cgi-bin in httpd.conf overlaped with ScriptAlias /cgi-bin in nagios.conf:

Code: Select all

[Tue Sep 22 17:13:58 2015] [error] [client 10.14.2.220] script not found or unable to stat: /usr/local/nagios/sbin/14all.cgi, referer: http://nagios.domain.local/mrtg/c2960-48-c2/
Of course I understand that I can just copy 14all.cgi to /usr/local/nagios/sbin/, but I believe that Nagios web-scripts must use own ScriptAlias directive as it was before.
The easiest action at this point would be to go back to the Nagios default, which is access using http://www.yourserver.name/nagios
DanielB
Posts: 77
Joined: Sun Aug 17, 2014 2:17 pm

Re: Nagios 4.1.1 Statusmap problem

Post by DanielB »

Hi, Holden.
DanielB wrote: I would also like to get to the bottom of this. I do not get along with the mysteries :) I will try to think what other tests I can doing.
I made an interesting test in FreeBSD 10.2 virtual machine with Iceweasel 40.0.3. Here everything ran smoothly using the same Nagios server.

An interesting difference I've noticed when comparing the errors tab on the "Console" of Firebug for Iceweasel in Debian is it shows several errores when zoom the map or move the mouse pointer over the icons of the network map. On Firefox running on FreeBSD it doesn't happens when doing the same actions. Do you think this might have to do with the problem we're having in Debian? Attached screenshot.

Thanks.

Best regards,
Daniel
Attachments
Errors on Iceweasel 40.0.3 running on Debian.
Errors on Iceweasel 40.0.3 running on Debian.
FreeBSD 10.2 with Iceweasel 40.0.3
FreeBSD 10.2 with Iceweasel 40.0.3
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios 4.1.1 Statusmap problem

Post by hsmith »

Very interesting! I'll PM one of the devs and let him know there is more information. I was unable to reproduce the issue on Debian Jessie, but that was using the English one. Terrible things happened when I tried to install it in Spanish, as I speak about zero... I haven't had a ton of time to tinker around with this this week, we have our Nagios World Conference and a huge product update coming up this week and the next.

Thanks for all the testing!
Former Nagios Employee.
me.
DanielB
Posts: 77
Joined: Sun Aug 17, 2014 2:17 pm

Re: Nagios 4.1.1 Statusmap problem

Post by DanielB »

Hi, Holden.
hsmith wrote:Very interesting! I'll PM one of the devs and let him know there is more information. I was unable to reproduce the issue on Debian Jessie, but that was using the English one. Terrible things happened when I tried to install it in Spanish, as I speak about zero... I haven't had a ton of time to tinker around with this this week, we have our Nagios World Conference and a huge product update coming up this week and the next.

Thanks for all the testing!
Thanks for sharing this information with the developers. Along the same line, I have installed Firebug on the Windows Server 2012 where I also have this problem with the information shown on the network map and I can see the same errors shown on Debian Jessie. Attached screenshot.

So we probably have something here. Especially if you do not see these errors in the tests where the information was displayed correctly. Can you confirm this?

Thanks.

Best regards,
Daniel
Attachments
Windows Server 2012
Windows Server 2012
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios 4.1.1 Statusmap problem

Post by hsmith »

I would say we have enough here to say that we have something. I can't confirm the same errors that you are getting because I am not getting them, sadly.
Former Nagios Employee.
me.
Locked