Repairing 3D Network Map at Nagios

You may face problem with your 3d network map. There will be 2 reasons: GD library is not working or the VRML module is not configured in your browser.

So, let’s do the first problem clear. Before compiling the Nagios you probably used “configure” command. You should concenrate on –with-gd-lib and –with-gd-lib parametres wich desribes where you GD library’s files are located. “Configure” command tries to connect those files automatically but sometimes it can’not to do this. To examine the problem let’s clear the distributive from files wich were made during the previous compilation:

# make clean

Then we create a log file for alerts by :

# ./configure –prefix=/usr/local/nagios –with-cgi-url=/nagios/cgi-bin –with-html-url=/nagios/ \
–with-nagios-user=nagios –with-nagios-grp=nagios –with-gd-lib=/usr/local/lib \
–with-gd-inc=/usr/local/include/gd > make.log

If there is no GD library during installation we will have something like this inside log file:

checking for gdImagePng in -lgd (order 1)… no
checking for gdImagePng in -lgd (order 2)… no
checking for gdImagePng in -lgd (order 3)… no

and etc.

Otherwise you will get the right notice:

checking for gdImagePng in -lgd (order 1)… yes
GD library was found!

So if you don’t have GD make the following execution:

# pkg_info | grep gd
gd-1.8.4_6 A graphics library for fast image creation

Now we know the complete name of the packet and look where it was installed:

# pkg_-L gd-1.8.4_6

Information for gd-1.8.4_6:

Files:
/usr/local/bin/bdftogd
/usr/local/bin/gd2copypal
/usr/local/bin/gd2topng
/usr/local/bin/gdparttopng
/usr/local/bin/gdtopng
/usr/local/bin/pngtogd
/usr/local/bin/pngtogd2
/usr/local/bin/webpng
/usr/local/include/gd/gd.h
/usr/local/include/gd/gd_io.h
/usr/local/include/gd/gdcache.h
/usr/local/include/gd/gdfontg.h
/usr/local/include/gd/gdfontl.h
/usr/local/include/gd/gdfontmb.h
/usr/local/include/gd/gdfonts.h
/usr/local/include/gd/gdfontt.h
/usr/local/lib/libgd.a
/usr/local/lib/libgd.so
/usr/local/lib/libgd.so.2
/usr/local/share/doc/gd/index.html

And do the following command:

#find / -name libgd.*
/usr/lib/libgd.so.1.2
/usr/lib/libgd.so.1
/usr/lib/libgd.so

#find / -name gd.h
/usr/include/gd.h

Now you know what are the parametres os –with-gd-lib and –with-gd-inc. Finally you can compile and install Nagios.

Software for VRML you can find on the Internet.

Comments

Got something to say?

You must be logged in to post a comment.