Page 1 of 2

Nagios Core Maps

Posted: Wed Sep 16, 2015 5:08 am
by neworderfac33
Good morning,

I am currently running Nagios Core 4.0.8

Having now set up my basic monitoring (with a lot of help from my good friends here!), I have now been asked to look at different ways to display the information that Nagios collects.

I have been looking at the Network Map, or at least I've been Googling it, as, whenever I click on "Map", I get:

Not Found
The requested URL /nagios/cgi-bin/statusmap.cgi was not found on this server.
Apache/2.2.15 (Red Hat) Server at 10.15.18.112 Port 80

Is this something that should be available with my Nagios version?

Thanks in advance.

Pete

Re: Nagios Core Maps

Posted: Wed Sep 16, 2015 10:17 am
by tmcdonald
Where do you have Nagios installed? On my system it is under /usr/local/nagios, so run the following command replacing that with whatever you have:

ls -l /usr/local/nagios/sbin/

and let's see your Nagios Apache config - mine is located at /etc/httpd/conf.d/nagios.conf but yours may differ.

Re: Nagios Core Maps

Posted: Wed Sep 16, 2015 10:32 am
by neworderfac33
Good afternoon,

Thanks for your reply - here's the file you asked for:

Code: Select all

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
   Require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
   Require valid-user
</Directory>
and here's the output of the command:

Code: Select all

-rwxrwxr-x 1 nagios nagios 307936 Jul 23 12:10 archivejson.cgi
-rwxrwxr-x 1 nagios nagios 287944 Jul 23 12:10 avail.cgi
-rwxrwxr-x 1 nagios nagios 288424 Jul 23 12:10 cmd.cgi
-rwxrwxr-x 1 nagios nagios 259240 Jul 23 12:10 config.cgi
-rwxrwxr-x 1 nagios nagios 300200 Jul 23 12:10 extinfo.cgi
-rwxrwxr-x 1 nagios nagios 234664 Jul 23 12:10 history.cgi
-rwxrwxr-x 1 nagios nagios 230824 Jul 23 12:10 notifications.cgi
-rwxrwxr-x 1 nagios nagios 308704 Jul 23 12:10 objectjson.cgi
-rwxrwxr-x 1 nagios nagios 226440 Jul 23 12:10 outages.cgi
-rwxrwxr-x 1 nagios nagios 230824 Jul 23 12:10 showlog.cgi
-rwxrwxr-x 1 nagios nagios 300232 Jul 23 12:10 status.cgi
-rwxrwxr-x 1 nagios nagios 306560 Jul 23 12:10 statusjson.cgi
-rwxrwxr-x 1 nagios nagios 246984 Jul 23 12:10 statuswml.cgi
-rwxrwxr-x 1 nagios nagios 230728 Jul 23 12:10 statuswrl.cgi
-rwxrwxr-x 1 nagios nagios 255208 Jul 23 12:10 summary.cgi
-rwxrwxr-x 1 nagios nagios 242920 Jul 23 12:10 tac.cgi
Thanks

Pete

Re: Nagios Core Maps

Posted: Wed Sep 16, 2015 10:35 am
by tmcdonald
Can you also include the ls -l output from my last post?

Re: Nagios Core Maps

Posted: Wed Sep 16, 2015 10:39 am
by neworderfac33
I just added it in! :-) - no statusmap.cgi!

Re: Nagios Core Maps

Posted: Wed Sep 16, 2015 11:28 am
by neworderfac33
I'm leaving for the day, so apologies id you post anything and i don't get back to you until tomorrow.
Thanks for your help! :-)

Re: Nagios Core Maps

Posted: Wed Sep 16, 2015 5:03 pm
by tgriep
For some reason it looks like the statusmap.cgi didn't get installed.
Do you still have the Nagios source directory on that system?
If so, there should be a log file in that folder that would give us a clue on why it didn't get installed.

Re: Nagios Core Maps

Posted: Thu Sep 17, 2015 6:55 am
by neworderfac33
Good afternoon,

We just looked through the original tar file and it doesn't appear to contain statusmap.cgi - should it be there, or is the file something that is created dynamically during installation?

I also found this in the forum:
https://support.nagios.com/forum/viewto ... =7&t=29361

which suggests that I might need something called Boutell's GD Library in order to create the map.

Does this sound right?

Thanks

Pete

Re: Nagios Core Maps

Posted: Thu Sep 17, 2015 4:48 pm
by tmcdonald
The original tar should have statusmap.c, which gets compiled into statusmap.cgi - do you see that? If you be in the "cgi" directory.

Re: Nagios Core Maps

Posted: Fri Sep 18, 2015 3:44 am
by neworderfac33
Yes, I'm looking at the original .tar from where I installed and it DOES have statusmap.c in there.

Do I need to reinstall, or is there any way in which I can just extract statusmap and do something with it? :-)

Failing this, a knowledgeable colleague of mine is proposing that we create a duplicate installation of Nagios in a virtual environment, and copy the statusmap.cgi from that into my live Nagios installation - is this a realistic alternative?

Thanks

Pete