Page 1 of 2

Map is blank - Legacy is not found

Posted: Thu Apr 28, 2016 3:12 am
by cocoyanouck
Hi, Hum, I feel that I monopolize the conversation since 2 last week because it's my third topic during this period...

I swear that it's my ultimate problem (kwown) :oops: :)
It's the last but not the least ...

So, My nagios-debian is running properly, the web-interface is OK, all the service and command are running too.

The final step (in order to transfer nagios windows server to nagios-debian) is to load a map (the plan of our enterprise), add parents on each host and add some hosts on this map with specifics icons.

My problem : I've read that the statusmap on nagios is generated automatically, but when I open "Map" on the interface web, I've nothing, only this :

Code: Select all

Network Map for All Hosts
Last Updated: none 
Nagios® Core™ 4.1.1 - www.nagios.org 
Updated every 10 seconds 
Logged in as nagiosadmin 
View Status Detail For This Host 
View Status Detail For All Hosts 
View Status Overview For All Hosts

And next to "Map", there is (Legacy). When I click, I have the following message :
Not Found
The requested URL /nagios/cgi-bin/statusmap.cgi was not found on this server.

I've tried to check the file cgi.cfg on nagios/etc and to uncomment "#statusmap_background_image=smbackground.gd2" ? Then I've load an image on /usr/local/nagios/share.image and rewrote the line like this :

statusmap_background_image=SNF.jpg

But still blank in "map".




For information, in nagios/sbin, there is a file status.cgi.

Furthermore, I don't know if it's in relation, but about the error in "legacy", I've read that there was a problem at the beginning of my nagios installation with packets libgd2-xpm-dev.
If I try again to use "apt-get libgd2-xpm-dev, I've the output :

Code: Select all

Reading of the lists of packages ... Fact 
Construction of the tree of dependences 
Reading of the information of state ... Fact 
Certain packages cannot be installed. This can mean that you asked for the impossible, either, if you use the distribution unstable, which certain packages were not created yet or did not go out of Incoming. 
The following information should help you to solve the situation: 
The following packages contain unsatisfied dependences: libgd2-dev: depends: libgd2-noxpm (= 2.1.0.5+deb8u1) but will not be installed 
E: Impossible to correct the problems, defective packages are in mode "to keep as is".
I think that libdgd3 had take place libgd2 => locate libgd3 => I've output in /usr/share/doc/libgd3 and /var/lib/dpkg/info/libgd3:i386...
But "locate libgd2" => I've nothing.

I'm really lost with all this outbuildings and updates :/ Any Idea ?

(config.log attached if it's can help you...).

Re: Map is blank - Legacy is not found

Posted: Thu Apr 28, 2016 1:48 pm
by rkennedy
Can you post your logs for us to take a look at? (if you can't find one of them, look around, I might be slightly off depending how your logs are setup.)

Code: Select all

/var/log/apache2/error_log
/var/log/apache2/access_log
Also, we'll need to see /etc/apache2/conf/httpd.conf and your entire /etc/apache2/conf.d/ directory (feel free to zip it up).

Re: Map is blank - Legacy is not found

Posted: Fri Apr 29, 2016 2:26 am
by cocoyanouck
For sure, but for the log, there are many files, do you need all theses files? Is this normal...?

About apache2, I've not httpd.conf but apaches2,conf, I suppose it's the same thing.

Re: Map is blank - Legacy is not found

Posted: Fri Apr 29, 2016 8:10 am
by cocoyanouck
Second message to upload apache logs and errors.

Re: Map is blank - Legacy is not found

Posted: Fri Apr 29, 2016 1:06 pm
by ssax
What is the output of these commands:

Code: Select all

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

Re: Map is blank - Legacy is not found

Posted: Mon May 02, 2016 1:42 am
by cocoyanouck
Hello,

Here it is.

Re: Map is blank - Legacy is not found

Posted: Mon May 02, 2016 4:21 am
by cocoyanouck
Maybe It could help you, or maybe this is another problem/distinct, but when I check the directory where I have downloaded nagios 4.1.1 for the installation, if i test "ls" I only have statusmap.c but not .cgi.

And I've read on the net that this is a problem during installation and compilation of nagios with outbuildings of libgd witch prevent the files creation of statusmap.cgi for instance.

Like I said, there is no libgd2 installed, but libgd3 on Debian 8 Jessie. And I couldn't install libgd2-xpm and libgd2-xpm-dev but only libgd3.
And if I want to test "libgd-dev I've the following error :

Re: Map is blank - Legacy is not found

Posted: Mon May 02, 2016 8:08 am
by cocoyanouck
Ok, I've done a few things : I've modify /etc/apt/source.list which used DVD instead of official sources...

Then, after apt-update and apt-upgrade, I've managed to install libgd2-xpm and libgd-dev.

Finally, I've done this :

Code: Select all

./configure –with-gd-lib=/usr/local/lib/ 
Then "make cgis"and verify if there was statusmap.cgi with this :

Code: Select all

cd cgi/
ls *.cgi
And a copy in the directory of nagios :

Code: Select all

cp *.cgi /usr/local/nagios/sbin/
I've restart Nagios service, and in the web interface, when I click on "Legacy", I've a map !!!!!!! (see the upload file).
So good.

But when I click on 'Map", I still have nothing. Maybe can I use only the part "Legacy" to use a custom image and indicate coordinates on each host ?

Re: Map is blank - Legacy is not found

Posted: Mon May 02, 2016 9:41 am
by ssax
Good job on the statusmap.cgi one, that's what I was thinking.

Let's check for map.html and the permissions that are set:

Code: Select all

ls -ld /usr/local/nagios/share/
ls -l /usr/local/nagios/share/

What does the page show when you click on Map, any errors or anything?

Re: Map is blank - Legacy is not found

Posted: Tue May 03, 2016 1:31 am
by cocoyanouck
Capture d’écran 2016-05-03 à 08.28.51.png
The map is missing but there is no message.