Xymon Mailing List Archive search

Larrd graphs not working

10 messages in this thread

list James B Horwath · Wed, 28 Dec 2005 17:06:16 -0500 ·
I'm trying to help a coworker debug/fix Hobbit running on Linux 7.2. I know BB pretty well, but I'm just learning Hobbit.  Everything on the Hobbit install works fine, except the larrd historical graphs.  For example at the bottom of machine X's disk page the icon for the larrd is grayed out.  I can click on it and see the next three grayed out icons which should be larrd graphs.  I have looked at things like permissions, read some documentation, etc.  This is new territory and we need to get the data there.  This was working at one time, a change was made and now it does not work.  We are not sure what change was made.

Thanks in advance,
Jim


This message, and any attachments to it, may contain information that
is privileged, confidential, and exempt from disclosure under
applicable law.  If the reader of this message is not the intended
recipient, you are notified that any use, dissemination, distribution,
copying, or communication of this message is strictly prohibited.  If
you have received this message in error, please notify the sender
immediately by return e-mail and delete the message and any
attachments.  Thank you.
list Henrik Størner · Thu, 29 Dec 2005 00:06:02 +0100 ·
quoted from James B Horwath
On Wed, Dec 28, 2005 at 05:06:16PM -0500, James B Horwath wrote:
I'm trying to help a coworker debug/fix Hobbit running on Linux 7.2. I 
know BB pretty well, but I'm just learning Hobbit.  Everything on the 
Hobbit install works fine, except the larrd historical graphs.  For 
example at the bottom of machine X's disk page the icon for the larrd is 
grayed out.  I can click on it and see the next three grayed out icons 
which should be larrd graphs.
Since the graph links show up, it sounds like the RRD files are being
created (meaning that the data is being picked up and archived); you
can check if there are any rrd-files in the data/rrd/HOSTNAME/
directories.

So I think it's a problem with the CGI that generates the actual graph
images. Debugging CGI's are a bit tricky, but:

- setup the environment variable QUERY_STRING, this is the part of the
  URL for the graph image that follows the '?'. It's done with
  export QUERY_STRING="host=voodoo.hswn.dk&service=conn&graph=hourly&action=view"
  (replace the hostname with what your host is called).
- also setup
    export REQUEST_METHOD=GET
    export REQUEST_URI=""
- run "~hobbit/cgi-bin/hobbitgraph.sh >/tmp/file.png"

Look at the output in /tmp/file.png. Any errors there ?

A common problem is that the rrdtool run-time library or some of
the graph libraries are not included in the default library search
path. You probably need to put the directory where these libraries
are installed into /etc/ld.so.conf and run "ldconfig" after that.


Regards,
Henrik
list Michael Frey · Thu, 29 Dec 2005 15:06:02 -0500 ·
After running the commands as you outlined below, the output in file.png 
is:
Content-type: image/png
Expires: Thu, 29 Dec 2005 19:26:06 GMT

If I view the file.png file with a png viewer, it is only a black screen.

Michael Frey
Intel Senior Systems Engineer
The Guardian Life Insurance Company of America
XXXX Burgess Place, 2-West
Bethlehem, PA XXXXX
E-Mail: user-0d6bef7dd02b@xymon.invalid
Phone: XXX-XXX-XXXX
Fax: XXX-XXX-XXXX


user-ce4a2c883f75@xymon.invalid (Henrik Stoerner) 
12/28/2005 06:06 PM
Please respond to
user-ae9b8668bcde@xymon.invalid


To
user-ae9b8668bcde@xymon.invalid
cc

Subject
Re: [hobbit] Larrd graphs not working
quoted from James B Horwath


On Wed, Dec 28, 2005 at 05:06:16PM -0500, James B Horwath wrote:
I'm trying to help a coworker debug/fix Hobbit running on Linux 7.2. I 
know BB pretty well, but I'm just learning Hobbit.  Everything on the 
Hobbit install works fine, except the larrd historical graphs.  For 
example at the bottom of machine X's disk page the icon for the larrd is 
grayed out.  I can click on it and see the next three grayed out icons 
which should be larrd graphs.
Since the graph links show up, it sounds like the RRD files are being
created (meaning that the data is being picked up and archived); you
can check if there are any rrd-files in the data/rrd/HOSTNAME/
directories.

So I think it's a problem with the CGI that generates the actual graph
images. Debugging CGI's are a bit tricky, but:

- setup the environment variable QUERY_STRING, this is the part of the
  URL for the graph image that follows the '?'. It's done with
  export 
QUERY_STRING="host=voodoo.hswn.dk&service=conn&graph=hourly&action=view"
  (replace the hostname with what your host is called).
- also setup
    export REQUEST_METHOD=GET
    export REQUEST_URI=""
- run "~hobbit/cgi-bin/hobbitgraph.sh >/tmp/file.png"

Look at the output in /tmp/file.png. Any errors there ?

A common problem is that the rrdtool run-time library or some of
the graph libraries are not included in the default library search
path. You probably need to put the directory where these libraries
are installed into /etc/ld.so.conf and run "ldconfig" after that.


Regards,
Henrik


This message, and any attachments to it, may contain information that
is privileged, confidential, and exempt from disclosure under
applicable law.  If the reader of this message is not the intended
recipient, you are notified that any use, dissemination, distribution,
copying, or communication of this message is strictly prohibited.  If
you have received this message in error, please notify the sender
immediately by return e-mail and delete the message and any
attachments.  Thank you.
list Henrik Størner · Thu, 29 Dec 2005 21:20:11 +0100 ·
quoted from Michael Frey
On Thu, Dec 29, 2005 at 03:06:02PM -0500, Michael Frey wrote:
After running the commands as you outlined below, the output in file.png 
is:
Content-type: image/png
Expires: Thu, 29 Dec 2005 19:26:06 GMT

If I view the file.png file with a png viewer, it is only a black screen.
You must delete the "Content-type: image/png", the "Expires:..." line,
and the blank line. Those lines are headers for the web browser, because 
the output is supposed to be a web response, and not simply a PNG file.

For the file to be a valid PNG file, it must begin with

<89>PNG


Regards,
Henrik
list Michael Frey · Thu, 29 Dec 2005 15:46:37 -0500 ·
After deleting the lines as suggested, and adding the <89>PNG, the image 
in the viewer is still a black screen.

If I delete the <89>PNG, the file size is zero bytes.

Thanks for your help.
quoted from Michael Frey

Michael Frey
Intel Senior Systems Engineer
The Guardian Life Insurance Company of America
XXXX Burgess Place, 2-West
Bethlehem, PA XXXXX
E-Mail: user-0d6bef7dd02b@xymon.invalid
Phone: XXX-XXX-XXXX
Fax: XXX-XXX-XXXX


user-ce4a2c883f75@xymon.invalid (Henrik Stoerner) 

12/29/2005 03:20 PM
signature
Please respond to
user-ae9b8668bcde@xymon.invalid


To
user-ae9b8668bcde@xymon.invalid
cc

Subject
Re: [hobbit] Larrd graphs not working


quoted from Michael Frey
On Thu, Dec 29, 2005 at 03:06:02PM -0500, Michael Frey wrote:
After running the commands as you outlined below, the output in file.png 
is:
Content-type: image/png
Expires: Thu, 29 Dec 2005 19:26:06 GMT

If I view the file.png file with a png viewer, it is only a black 
screen.
You must delete the "Content-type: image/png", the "Expires:..." line,
and the blank line. Those lines are headers for the web browser, because 
the output is supposed to be a web response, and not simply a PNG file.

For the file to be a valid PNG file, it must begin with

<89>PNG


Regards,
Henrik


This message, and any attachments to it, may contain information that
is privileged, confidential, and exempt from disclosure under
applicable law.  If the reader of this message is not the intended
recipient, you are notified that any use, dissemination, distribution,
copying, or communication of this message is strictly prohibited.  If
you have received this message in error, please notify the sender
immediately by return e-mail and delete the message and any
attachments.  Thank you.
list Henrik Størner · Thu, 29 Dec 2005 22:30:43 +0100 ·
quoted from Michael Frey
On Thu, Dec 29, 2005 at 03:46:37PM -0500, Michael Frey wrote:
After deleting the lines as suggested, and adding the <89>PNG, the image 
in the viewer is still a black screen.

If I delete the <89>PNG, the file size is zero bytes.
OK, that *is* very small.

What does the RRD files look like ? Those in the
~hobbit/data/rrd/HOSTNAME/ directory - they should be at least 
some 18-19 KB in size or larger.

If you run "rrdtool dump ~hobbit/data/rrd/HOSTNAME/tcp.conn.rrd", 
the beginning of the output should look like this:

-------- start rrdtool dump output --------
<!-- Round Robin Database Dump -->
<rrd>
        <version> 0003 </version>
        <step> 300 </step> <!-- Seconds -->
        <lastupdate> 1135891575 </lastupdate> <!-- 2005-12-29 22:26:15
CET -->

        <ds>
                <name> sec </name>
                <type> GAUGE </type>
                <minimal_heartbeat> 600 </minimal_heartbeat>
                <min> 0.0000000000e+00 </min>
                <max> NaN </max>

                <!-- PDP Status -->
                <last_ds> UNKN </last_ds>
                <value> 2.2500000000e-03 </value>
                <unknown_sec> 0 </unknown_sec>
        </ds>

<!-- Round Robin Archives -->
        <rra>
-------- end of rrdtool dump output --------


You can try generating the graph image for one of the TCP "conn" 
graphs by running

rrdtool graph x.png \
   --title "localhost TCP Connection Times Last 48 Hours" \
   -w576 -h120 -v Seconds -a PNG -s "e-48h" \
   "DEF:p0=/home/hobbit/data/rrd/localhost/tcp.conn.rrd:sec:AVERAGE" \
   "LINE2:p0#0000FF:conn"

(replace the "/home/hobbit..." filename with the filename of your
tcp.conn.rrd file).

If you run this, what happens ? The output should be "673x199" (which is
the size of the generated PNG image), and the PNG image is in the x.png
file.


Henrik
list Michael Frey · Thu, 29 Dec 2005 16:50:44 -0500 ·
File sixe = 35,000 kb.

Beginning of the outpout looks just like your example.

After running rrdtool...:
libpng warning: Application was compiled with png.h from libpng-1.2.8
libpng warning: Application  is running with png.c from libpng-1.0.12
libpng error: Incompatible libpng version in application and library
673x199

Thanks,
quoted from Michael Frey

Michael Frey
Intel Senior Systems Engineer
The Guardian Life Insurance Company of America
XXXX Burgess Place, 2-West
Bethlehem, PA XXXXX
E-Mail: user-0d6bef7dd02b@xymon.invalid
Phone: XXX-XXX-XXXX
Fax: XXX-XXX-XXXX


user-ce4a2c883f75@xymon.invalid (Henrik Stoerner) 

12/29/2005 04:30 PM
signature
Please respond to
user-ae9b8668bcde@xymon.invalid


To
user-ae9b8668bcde@xymon.invalid
cc

Subject
Re: [hobbit] Larrd graphs not working


quoted from Michael Frey
On Thu, Dec 29, 2005 at 03:46:37PM -0500, Michael Frey wrote:
After deleting the lines as suggested, and adding the <89>PNG, the image 
in the viewer is still a black screen.

If I delete the <89>PNG, the file size is zero bytes.
OK, that *is* very small.

What does the RRD files look like ? Those in the
~hobbit/data/rrd/HOSTNAME/ directory - they should be at least 
some 18-19 KB in size or larger.

If you run "rrdtool dump ~hobbit/data/rrd/HOSTNAME/tcp.conn.rrd", 
the beginning of the output should look like this:

-------- start rrdtool dump output --------
<!-- Round Robin Database Dump -->
<rrd>
        <version> 0003 </version>
        <step> 300 </step> <!-- Seconds -->
        <lastupdate> 1135891575 </lastupdate> <!-- 2005-12-29 22:26:15
CET -->

        <ds>
                <name> sec </name>
                <type> GAUGE </type>
                <minimal_heartbeat> 600 </minimal_heartbeat>
                <min> 0.0000000000e+00 </min>
                <max> NaN </max>

                <!-- PDP Status -->
                <last_ds> UNKN </last_ds>
                <value> 2.2500000000e-03 </value>
                <unknown_sec> 0 </unknown_sec>
        </ds>

<!-- Round Robin Archives -->
        <rra>
-------- end of rrdtool dump output --------


You can try generating the graph image for one of the TCP "conn" 
graphs by running

rrdtool graph x.png \
   --title "localhost TCP Connection Times Last 48 Hours" \
   -w576 -h120 -v Seconds -a PNG -s "e-48h" \
 

"DEF:p0=/usr/local/hobbit/data/rrd/adminfunct.nro.glic.com/tcp.conn.rrd:sec:AVERAGE" 
quoted from Michael Frey
\
   "LINE2:p0#0000FF:conn"

(replace the "/home/hobbit..." filename with the filename of your
tcp.conn.rrd file).

If you run this, what happens ? The output should be "673x199" (which is
the size of the generated PNG image), and the PNG image is in the x.png
file.


Henrik


This message, and any attachments to it, may contain information that
is privileged, confidential, and exempt from disclosure under
applicable law.  If the reader of this message is not the intended
recipient, you are notified that any use, dissemination, distribution,
copying, or communication of this message is strictly prohibited.  If
you have received this message in error, please notify the sender
immediately by return e-mail and delete the message and any
attachments.  Thank you.
list Henrik Størner · Thu, 29 Dec 2005 22:58:50 +0100 ·
quoted from Michael Frey
On Thu, Dec 29, 2005 at 04:50:44PM -0500, Michael Frey wrote:
After running rrdtool...:
libpng warning: Application was compiled with png.h from libpng-1.2.8
libpng warning: Application  is running with png.c from libpng-1.0.12
libpng error: Incompatible libpng version in application and library
OK, so hobbitgraph.cgi picks up the wrong libpng*.so file.

You can probably make it work by explicitly setting LD_LIBRARY_PATH
in the ~hobbit/cgi-bin/hobbitgraph.sh file, so it points to the
directory where you have the 1.2.8 version of libpng*.so installed.
E.g. if you have the library in /usr/local/lib/libpng.so.1.2.8, then
add this to hobbitgraph.sh before the call to hobbitgraph.cgi:

   LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
   export LD_LIBRARY_PATH


Regards,
Henrik
list Michael Frey · Thu, 29 Dec 2005 17:40:03 -0500 ·
hobbit graph.sh:

LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

. /usr/local/hobbit/server/etc/hobbitcgi.cfg
 exec /usr/local/hobbit/server/bin/hobbitgraph.cgi $CGI_HOBBITGRAPH_OPTS

I did a make clean, and make install on libpng-1.2.8.

Restarted httpd and hobbit.

Still getting:
quoted from Michael Frey
libpng warning: Application was compiled with png.h from libpng-1.2.8
libpng warning: Application  is running with png.c from libpng-1.0.12
libpng error: Incompatible libpng version in application and library
673x199

Thanks,


Michael Frey
Intel Senior Systems Engineer
The Guardian Life Insurance Company of America
XXXX Burgess Place, 2-West
Bethlehem, PA XXXXX
E-Mail: user-0d6bef7dd02b@xymon.invalid
Phone: XXX-XXX-XXXX
Fax: XXX-XXX-XXXX


user-ce4a2c883f75@xymon.invalid (Henrik Stoerner) 

12/29/2005 04:58 PM
signature
Please respond to
user-ae9b8668bcde@xymon.invalid


To
user-ae9b8668bcde@xymon.invalid
cc

Subject
Re: [hobbit] Larrd graphs not working


quoted from Michael Frey
On Thu, Dec 29, 2005 at 04:50:44PM -0500, Michael Frey wrote:
After running rrdtool...:
libpng warning: Application was compiled with png.h from libpng-1.2.8
libpng warning: Application  is running with png.c from libpng-1.0.12
libpng error: Incompatible libpng version in application and library
OK, so hobbitgraph.cgi picks up the wrong libpng*.so file.

You can probably make it work by explicitly setting LD_LIBRARY_PATH
in the ~hobbit/cgi-bin/hobbitgraph.sh file, so it points to the
directory where you have the 1.2.8 version of libpng*.so installed.
E.g. if you have the library in /usr/local/lib/libpng.so.1.2.8, then
add this to hobbitgraph.sh before the call to hobbitgraph.cgi:

   LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
   export LD_LIBRARY_PATH


Regards,
Henrik


This message, and any attachments to it, may contain information that
is privileged, confidential, and exempt from disclosure under
applicable law.  If the reader of this message is not the intended
recipient, you are notified that any use, dissemination, distribution,
copying, or communication of this message is strictly prohibited.  If
you have received this message in error, please notify the sender
immediately by return e-mail and delete the message and any
attachments.  Thank you.
list Galen Johnson · Sat, 31 Dec 2005 10:52:57 -0500 ·
quoted from Michael Frey
Michael Frey wrote:
hobbit graph.sh:

LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

. /usr/local/hobbit/server/etc/hobbitcgi.cfg
 exec /usr/local/hobbit/server/bin/hobbitgraph.cgi $CGI_HOBBITGRAPH_OPTS

I did a make clean, and make install on libpng-1.2.8.

Restarted httpd and hobbit.

Still getting:
libpng warning: Application was compiled with png.h from libpng-1.2.8
libpng warning: Application  is running with png.c from libpng-1.0.12
libpng error: Incompatible libpng version in application and library
673x199

Thanks,


Michael Frey
Intel Senior Systems Engineer
The Guardian Life Insurance Company of America
XXXX Burgess Place, 2-West
Bethlehem, PA XXXXX
E-Mail: user-0d6bef7dd02b@xymon.invalid
Phone: XXX-XXX-XXXX
Fax: XXX-XXX-XXXX


*user-ce4a2c883f75@xymon.invalid (Henrik Stoerner)*

12/29/2005 04:58 PM
Please respond to
user-ae9b8668bcde@xymon.invalid

	
To
	user-ae9b8668bcde@xymon.invalid
cc
	
Subject
	Re: [hobbit] Larrd graphs not working


On Thu, Dec 29, 2005 at 04:50:44PM -0500, Michael Frey wrote:
After running rrdtool...:
libpng warning: Application was compiled with png.h from libpng-1.2.8
libpng warning: Application  is running with png.c from libpng-1.0.12
libpng error: Incompatible libpng version in application and library
OK, so hobbitgraph.cgi picks up the wrong libpng*.so file.

You can probably make it work by explicitly setting LD_LIBRARY_PATH
in the ~hobbit/cgi-bin/hobbitgraph.sh file, so it points to the
directory where you have the 1.2.8 version of libpng*.so installed.
E.g. if you have the library in /usr/local/lib/libpng.so.1.2.8, then
add this to hobbitgraph.sh before the call to hobbitgraph.cgi:

  LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
  export LD_LIBRARY_PATH
What OS is this on?  I don't see it in the thread.

=G=