Page 2 of 3

Re: Several graphs not working after manual build/install

Posted: Wed Dec 21, 2011 5:00 pm
by lynrob
I get the same error in both Nagios and XI:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.2.15 (Red Hat) Server at cor2-nagios.hhven.net Port 80

From the httpd error_log:
[Wed Dec 21 13:45:09 2011] [error] [client 10.110.255.226] /usr/local/nagios/sbin/statusmap.cgi: error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory, referer: http://cor2-nagios.hhven.net/nagios/side.php
[Wed Dec 21 13:45:09 2011] [error] [client 10.110.255.226] Premature end of script headers: statusmap.cgi, referer: http://cor2-nagios.hhven.net/nagios/side.php

I checked to see which package provides the libgd shared objects file:

> yum provides libgd.so.2
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
epel/metalink | 11 kB 00:00
rhel-x86_64-server-6 | 1.8 kB 00:00
rhel-x86_64-server-optional-6 | 1.8 kB 00:00
rhel-x86_64-server-supplementary-6 | 1.8 kB 00:00
rpmforge | 1.1 kB 00:00
gd-2.0.35-10.el6.i686 : A graphics library for quick creation of PNG or JPEG images
Repo : rhel-x86_64-server-6
Matched from:
Other : libgd.so.2

> yum install gd-2.0.35-10.el6
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
Package gd-2.0.35-10.el6.x86_64 already installed and latest version
Nothing to do

> locate libgd
.
.
.
/usr/lib64/libgd.so
/usr/lib64/libgd.so.2
/usr/lib64/libgd.so.2.0.0
.
.
.
So the file appears to be there I am not sure why the CGI can't find it.

Re: Several graphs not working after manual build/install

Posted: Wed Dec 21, 2011 5:07 pm
by lynrob
This is probably not related but when I loaded up the Nagios Core web page, I noticed that some company logos that I had installed work in Nagios Core but not in XI. In XI, most logos are displayed but the ones I added are not, only the alternate text.

Re: Several graphs not working after manual build/install

Posted: Wed Dec 21, 2011 6:27 pm
by lynrob
Ok, some progress. Apparently, on a 64-bit machine, RHEL 6 loads only x86-64 packages by default, in RHEL 5 the default was to load both 32-bit and 64-bit libraries. In order to load 32-bit libraries, one must set the multilib_policy directive in the /etc/yum.conf file to' multilib_policy=all'. I installed the 32-bit "gd" library but now the CGI doesn't complain about the missing library and I can see a Network status map, sort of... it is there but the graph is all black. All I can see are the node icons and names.

Re: Several graphs not working after manual build/install

Posted: Wed Dec 21, 2011 7:50 pm
by lynrob
More info... I was looking more closely at the "Host Graphs" and found that graphs for all of the hosts that I have added on this server are working. The hosts whose graphs are not working are the ones that I restored from a backup of my old XI server (CentOS 6 VM image from the XI website). Is there a way for me to "reset" the imported hosts?

Re: Several graphs not working after manual build/install

Posted: Thu Dec 22, 2011 10:22 am
by scottwilkerson
I had sent a query about this to one of our developers and here is what he thinks we should do:
RHEL 6.1 threw a curve ball our way when it moved several of our packages into a new package channel that has to be optionally added as of RHEL 6.1. This is fixed in 1.9 install scripts, but it'll probably bite us for 1.7 and 1.8.


He'll be missing these packages:

No package gd-devel available.
No package rrdtool-perl available.
No package php-snmp available.
No package graphviz available.
No package perl(XML::Simple) available.

He'll need to add an additional RHEL channel.
http://support.nagios.com/wiki/index.ph ... ptions..22

Have him try installing those packages first and see if it resolves the issue, but my guess is that Core will need to be recompiled because some of the gd-devel libraries are missing.
He may need to do a backup procedure, rerun the 1.9 installer from a fresh tarball, and then restore.

Re: Several graphs not working after manual build/install

Posted: Fri Dec 23, 2011 1:07 pm
by lynrob
I downloaded the 2011v1.9 tarball and ran ./fullinstall without any issues. Unfortunately, little seems to have changed. One thing surprised me... I didn't need to restore my backup. Everything still seemed to be in place. Did I miss a step to delete the existing config? If so, how do I do that? The Network Status Map now has a white background as it should but it now only displays a fraction of the installed hosts. You can see there are many missing hosts by comparing this screenshot to the previous mostly black one. I can't determine a pattern for which ones are displayed and which are not. Some of them were recently added and some are among the very first hosts I added. Host graphs are still only available for hosts added after I moved to the new server.

Re: Several graphs not working after manual build/install

Posted: Tue Dec 27, 2011 11:20 am
by scottwilkerson
Our backup and restore procedure can be found in this document
http://assets.nagios.com/downloads/nagi ... ing_XI.pdf

Re: Several graphs not working after manual build/install

Posted: Wed Jan 04, 2012 4:35 pm
by lynrob
Thanks Scott! I am not sure why, but the Network Status Map now seems to be working well. The only problems remaining are that for the host graphs and graph explorer the only graphs displayed are for those nodes added after I restored NagiosXI on the new server. All of the nodes that existed before the system was backed up on the old server (prior to the move) do not have any graphs.

Also, I added icons images for some of our devices and they don't show up in XI. They do, however, show up on the same displays in Nagios core (see screen shots below).

Re: Several graphs not working after manual build/install

Posted: Fri Jan 06, 2012 5:48 pm
by scottwilkerson
In XI can I have you look at the Misc Settings Tab under
Configure -> Core Config Manager -> Hosts -> Modify Host (for one of these hosts)

And tell me what is in the following fields
Icon image
Icon image ALT text
Status image

Re: Several graphs not working after manual build/install

Posted: Mon Jan 16, 2012 4:47 pm
by lynrob
Hi Scott,
Sorry for the late reply I didn't have email notifications turned on like I thought I did... Those fields are all blank in the modify hosts screen. That is because the icon is inherited from a template. I tried setting the fields directly in the modify host config but it didn't help:
icon image: polycom.com
icon image alt text: polycom
status image: polycom.com

FWIW, I noticed that the icons work in the network status map in the hierarchy tree display for these same devices. The icons also work fine in the all of the old style Nagios core charts and graphs.

Back to a previous topic, any thoughts as to why for host graphs and graph explorer the only graphs displayed are for those nodes added after I restored NagiosXI on the new server? All nodes that were covered from the back up display no graphs.

Thanks again for all of your help.