Discussion:
[Nagios-users] gd2 icons not displayed in statusmap
Matt Pounsett
2004-02-12 21:34:32 UTC
Permalink
I know this has been covered before, but it looks like the sourceforge mailing
list search isn't functioning right now.. and I don't see anything in the
FAQs.. so apologies for the noise. If anyone has a docs source to send me to,
rather than adding to the list traffic, I'll be happy to receive them.

Basically, the statusmap.cgi appears to not be reading my gd2 images. No
errors are being generated either, which is making troubleshooting difficult.
I'm assuming that the problem is with my use of pngtogd2, but can't confirm
this. The Nagios docs recommend using no compression, but there's no
recommendation for chunk size. Is this likely to be an issue?

Basically, I'm using:

pngtogd2 image.png image.gd2 0 0

I've also tried

pngtogd2 image.png image.gd2 1 0

No luck either way. I know the extinfo in general is being read, because I'm
seeing icons set in the status info and 3D status map. The hostextinfo for
the host I'm tesing with looks like this:

define hostextinfo {
host_name foo.domain.com
icon_image redhat.png
icon_image_alt RedHat Edge Server 3.0
vrml_image redhat.png
statusmap_image redhat.gd2
}

The files are also in place:

-rw-r--r-- 1 root root 6423 Feb 12 18:25 /usr/local/nagios/share/images/logos/redhat.gd2
-rw-r--r-- 1 root root 1319 Feb 12 17:52 /usr/local/nagios/share/images/logos/redhat.png

Anyone have ideas or docs pointers?
--
Matt Pounsett CIRA - Canadian Internet Registration Authority
Technical Support Programmer 350 Sparks Street, Suite 1110
***@cira.ca Ottawa, Ontario, Canada
613.237.5335 ext. 231 http://www.cira.ca
Scott Machtmes
2004-02-12 22:00:37 UTC
Permalink
I also have noticed on a related note that despite the documentation,
the statusmap doesn't appear to like gif images. Just a question mark
image is shown. If I switch to png or gd2 it works properly. (nagios 1.1
version).
Post by Matt Pounsett
I know this has been covered before, but it looks like the sourceforge mailing
list search isn't functioning right now.. and I don't see anything in the
FAQs.. so apologies for the noise. If anyone has a docs source to send me to,
rather than adding to the list traffic, I'll be happy to receive them.
Basically, the statusmap.cgi appears to not be reading my gd2 images. No
errors are being generated either, which is making troubleshooting difficult.
I'm assuming that the problem is with my use of pngtogd2, but can't confirm
this. The Nagios docs recommend using no compression, but there's no
recommendation for chunk size. Is this likely to be an issue?
pngtogd2 image.png image.gd2 0 0
I've also tried
pngtogd2 image.png image.gd2 1 0
No luck either way. I know the extinfo in general is being read, because I'm
seeing icons set in the status info and 3D status map. The hostextinfo for
define hostextinfo {
host_name foo.domain.com
icon_image redhat.png
icon_image_alt RedHat Edge Server 3.0
vrml_image redhat.png
statusmap_image redhat.gd2
}
-rw-r--r-- 1 root root 6423 Feb 12 18:25 /usr/local/nagios/share/images/logos/redhat.gd2
-rw-r--r-- 1 root root 1319 Feb 12 17:52 /usr/local/nagios/share/images/logos/redhat.png
Anyone have ideas or docs pointers?
--
------------------------------------
Scott Machtmes, Sr. Systems Technologist
Engineering Technical Support
Brocade Communications
1745 Technology Drive
San Jose, Ca. 95110
408-333-7203
***@brocade.com
Paul L. Allen
2004-02-13 13:35:34 UTC
Permalink
Post by Matt Pounsett
pngtogd2 image.png image.gd2 0 0
I've also tried
pngtogd2 image.png image.gd2 1 0
Try 0 1. In fact, first try it without any arguments to confirm that
the version you have expects chunk-size followed by format and that 1 is
for raw and 2 is for compressed.

Also note that you should do the conversion on the machine that is running
Nagios because the GD2 file format has undergone incompatible changes
with different versions of the gd2 libraries. The easiest way of making
sure you convert using the right version is to do it on the same machine.
--
Paul Allen
Softflare Support
Matt Pounsett
2004-02-13 14:13:38 UTC
Permalink
Post by Matt Pounsett
Basically, the statusmap.cgi appears to not be reading my gd2 images. No
errors are being generated either, which is making troubleshooting difficult.
I'm assuming that the problem is with my use of pngtogd2, but can't confirm
this. The Nagios docs recommend using no compression, but there's no
recommendation for chunk size. Is this likely to be an issue?
Sorry to followup my own post, but further investigation has turned up another
potential problem. This looks like it might be an issue at compile-time.
Basically, it didn't look like my statusmap was properly linked against libgd,
libgd, even though it appears to be linked (error free) at compile time.

% ldd statusmap.cgi
libz.so.1 => /usr/lib/libz.so.1 (0xb75d2000)
libm.so.6 => /lib/tls/libm.so.6 (0xb75b0000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb758d000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb756f000)
libc.so.6 => /lib/tls/libc.so.6 (0xb7437000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb75eb000)

ldconfig had created a symlink from /usr/local/lib/libgd.so.2 to
/usr/local/lib/libgd.so.2.0.0, but there was no libgd.so .. I created that
symlink, recompiled, and voila:

% ldd statusmap.cgi
libgd.so.2 => /usr/local/lib/libgd.so.2 (0xb75a8000)
libz.so.1 => /usr/lib/libz.so.1 (0xb759a000)
libm.so.6 => /lib/tls/libm.so.6 (0xb7578000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7555000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7537000)
libc.so.6 => /lib/tls/libc.so.6 (0xb73ff000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb73ae000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb75eb000)

This is RedHat Edge Server 3.0.

Was this a real problem, or all in my head? My status map was being updated
as I added new hosts, which suggests that it was at least able to use gd to
assemble the map image... but what was with the missing ld info?

I still haven't been able to get statusmap.cgi to show any custom icons, but
thought I'd drop this on the list and see if anyone had any insight.
--
Matt Pounsett CIRA - Canadian Internet Registration Authority
Technical Support Programmer 350 Sparks Street, Suite 1110
***@cira.ca Ottawa, Ontario, Canada
613.237.5335 ext. 231 http://www.cira.ca
Matt Pounsett
2004-02-13 14:25:55 UTC
Permalink
Post by Paul L. Allen
Post by Matt Pounsett
pngtogd2 image.png image.gd2 0 0
I've also tried
pngtogd2 image.png image.gd2 1 0
Try 0 1. In fact, first try it without any arguments to confirm that
the version you have expects chunk-size followed by format and that 1 is
for raw and 2 is for compressed.
Yeah, I'd checked I had the right version already. Thanks... those args did
the trick. I'll whip up something for the FAQ later so we don't have yet
another repeat of this conversation.
Post by Paul L. Allen
Also note that you should do the conversion on the machine that is running
Nagios because the GD2 file format has undergone incompatible changes
with different versions of the gd2 libraries. The easiest way of making
sure you convert using the right version is to do it on the same machine.
Yeah, was doing that as well. I've been burned by gd file format changes in
the past.

Thanks Paul.
--
Matt Pounsett CIRA - Canadian Internet Registration Authority
Technical Support Programmer 350 Sparks Street, Suite 1110
***@cira.ca Ottawa, Ontario, Canada
613.237.5335 ext. 231 http://www.cira.ca
Paul L. Allen
2004-02-13 15:27:34 UTC
Permalink
Post by Matt Pounsett
I'll whip up something for the FAQ later so we don't have yet
another repeat of this conversation.
I think the FAQ entry there has arguments appropriate to an older
version. So it's probably worth telling people how to find out
which set of arguments they need.
Post by Matt Pounsett
I've been burned by gd file format changes in the past.
Something else for the FAQ, I think. Of course, if you botch an
upgrade of libgd on your Nagios machine, even that won't help you. :)
--
Paul Allen
Softflare Support
Matt Pounsett
2004-02-16 13:50:10 UTC
Permalink
Post by Paul L. Allen
Post by Matt Pounsett
I'll whip up something for the FAQ later so we don't have yet
another repeat of this conversation.
I think the FAQ entry there has arguments appropriate to an older
version. So it's probably worth telling people how to find out
which set of arguments they need.
Is there even a FAQ entry there? When I first had the problem I did a search
for 'pngtogd' and came up empty. Is the search busted?
--
Matt Pounsett CIRA - Canadian Internet Registration Authority
Technical Support Programmer 350 Sparks Street, Suite 1110
***@cira.ca Ottawa, Ontario, Canada
613.237.5335 ext. 231 http://www.cira.ca
Paul L. Allen
2004-02-16 14:04:11 UTC
Permalink
Post by Matt Pounsett
Is there even a FAQ entry there?
Yes, under Web Interfaces. <URL:
http://www.nagios.org/faqs/viewfaq.php?faq_id=97 >
Post by Matt Pounsett
When I first had the problem I did a search
for 'pngtogd' and came up empty.
The FAQ doesn't mention pngtogd but it does mention pngtogd2. However,
the search doesn't find that either.
Post by Matt Pounsett
Is the search busted?
Matt Pounsett
2004-02-16 16:53:01 UTC
Permalink
Post by Matt Pounsett
Is the search busted?
Loading...