Statusmap error

Donal Hunt Donal.Hunt+nagios-users at dcu.ie
Thu Jan 23 10:42:49 CET 2003


I ran into the same problem over the past few days and i fixed it last
night.

For the past two days I had tried everything to get images working on
the statusmap.  Until last night...

I had created a PNG using GIMP on Win32 (40 x 40 px) and scp-ed the file
over to my test box running nagios.

I then converted the PNG to GD2 format using the following command:

pngtogd2 pc.png pc.gd2 1 1        (cos i didn't know what the chunk size
did).

I restarted the nagios process and i still had no images on the
statusmap (just the question mark).

I searched through the mailing list archives, the FAQ, the documentation
for over an hour and finally found a note about pngtogd2.  Using the
following command:

pngtogd2 pc.png pc.gd2 0 1 

solved the problem.  Nagios seems to what fully uncompressed gd2 images
- anything else and it just won't display the image - maybe this is an
issue with CPU computation time (i.e. nagios seeing the file is
compressed / too big and just not bothering / unable to render it...

I've only one issue outstanding and that's a problem with the gd2
image... you can see the problem at this URL:

http://www.redbrick.dcu.ie/~redgiant/mangled-image-file.jpg

If anyone could advise as to where the problem may be occurring I'ld
appreciate it.
Regards

Donal
DCU

Dan Rich wrote:
> 
> Jayson Kliger said:
> > I was just going by the recommendations to use gd2 to save cpu time, but
> > I would think that its not necessary, I edited my hostextinfo.cfg file
> > to change the statusmap imaged to png..reload/restart still no go..? I
> > have confirmed that the
> > physical_html_path=/usr/local/nagios/share/images/logos.. and the images
> > are there....
> 
> I can think of two things to check, since I spent some time trying to
> figure out some odd image problems on my system as well.
> 
> The most obvious, make sure your web server has permission to read the files.
> 
> The less obvious, look for errors in your extended information
> configuration.  If you are using templates, make sure you haven't defined
> a template with one name and used it with another.  I've found that a
> single error in the extended information can cause statusmap (and other
> cgis that display images) to behave oddly.  For example, I had the
> following in my hostextinfo.cfg file earlier today:
> define hostextinfo{
>         name                    windowshost
>         icon_image              win40.png
>         icon_image_alt          Windows host
>         vrml_image              win40.jpg
>         gd2_image               win40.gd2
>         register                0
> }
> define hostextinfo{
>         use                     windows-host
>         host_name               papyrus
>         icon_image_alt          papyrus
> }
> 
> The mismatch between the name and use statements caused not only the
> windows hosts to not display but for some reason about half of my routers
> and switches (the other half displayed fine).  Correcting this one typo
> made everything that was displaying as a ? display with the correct
> graphics.
> 
> Also, if you look at the status summary and click on a host, do you see
> the icons there?
> 
> > On Wed, 2003-01-22 at 17:29, Potter, G M (Greg) wrote:
> >> I am using png images for my icons.  Is there a reason to use gd2
> >> instead? I guess I missed that in the setup docs.
> >>
> >> Greg
> >>
> >> > -----Original Message-----
> >> > From: Steve Bonds [mailto:r1p6os402 at sneakemail.com]
> >> > Sent: Wednesday, January 22, 2003 3:07 PM
> >> > To: nagios-users at lists.sourceforge.net
> >> > Subject: RE: [Nagios-users] Statusmap error
> >> >
> >> >
> >> > On 22 Jan 2003, Jayson Kliger jayson-at-sonictrading.com
> >> > |Nagios| wrote:
> >> >
> >> > > ok..I took the gd2 image that I had and used: gd2topng to convert
> >> it back to see if the png image was ok..it was.., so if my
> >> situation is the same as what you went through, I should use the
> >> gd-1.8.4 "pngtogd2", is it possible to just compile that specific
> >> utillity or would I have to compile the whole version ..Thanks
> >> again for you advice
> 
> --
> Dan Rich <drich at employees.org> |   http://www.employees.org/~drich/
>                                |  "Step up to red alert!"  "Are you sure,
> sir?
>                                |   It means changing the bulb in the sign..."
>                                |          - Red Dwarf (BBC)
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Scholarships for Techies!
> Can't afford IT training? All 2003 ictp students receive scholarships.
> Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
> www.ictp.com/training/sourceforge.asp
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com




More information about the Users mailing list