Map is blank - Legacy is not found

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.
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Map is blank - Legacy is not found

Post 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...).
Attachments
config.log
(69.63 KiB) Downloaded 306 times
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Map is blank - Legacy is not found

Post 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).
Former Nagios Employee
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: Map is blank - Legacy is not found

Post 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.
Attachments
apache2.zip
(68.72 KiB) Downloaded 138 times
Capture d’écran 2016-04-29 à 09.17.46.png
Capture d’écran 2016-04-29 à 09.17.19.png
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: Map is blank - Legacy is not found

Post by cocoyanouck »

Second message to upload apache logs and errors.
Attachments
apache log & error.7z
(143.89 KiB) Downloaded 156 times
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Map is blank - Legacy is not found

Post by ssax »

What is the output of these commands:

Code: Select all

ls -ld /usr/local/nagios/sbin
ls -l /usr/local/nagios/sbin
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: Map is blank - Legacy is not found

Post by cocoyanouck »

Hello,

Here it is.
Attachments
Capture d’écran 2016-05-02 à 08.39.26.png
Capture d’écran 2016-05-02 à 08.39.02.png
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: Map is blank - Legacy is not found

Post 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 :
Attachments
Capture d’écran 2016-05-02 à 11.59.22.png
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: Map is blank - Legacy is not found

Post 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 ?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Map is blank - Legacy is not found

Post 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?
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: Map is blank - Legacy is not found

Post by cocoyanouck »

Capture d’écran 2016-05-03 à 08.28.51.png
The map is missing but there is no message.
Attachments
Capture d’écran 2016-05-03 à 08.30.28.png
Capture d’écran 2016-05-03 à 08.28.22.png
Locked