[hobbit] Graphs are fuzzy and distorted : Solaris 8/sparc

Henrik Stoerner henrik at hswn.dk
Sat Feb 10 23:32:57 CET 2007


On Sat, Feb 10, 2007 at 04:56:28PM -0500, Yannick Mercier wrote:
> Yes, I hope that I will get some help because I really dont know
> where to look in the hobbit config for graphs generation parameters that I
> could change..

One thing you could try was to completely remove any Hobbit code from
the graph generation and see if the graph image still looks weird.

Get one of the graphs in your browser and note the URL for the graph
image. (If using Firefox,then right-click and "View image" will bring up
only the graph image, with the URL for this in the address bar). It will 
be something like (one long line):

http://hobbit.test.com/cgi-bin/hobbitgraph.sh?host=myhost&service=la&graph_width=576&graph_height=120&disp=myhost&nostale&color=green&graph=hourly&action=view

Grab the part after the '?' and put it into the QUERY_STRING environment
variable, and setup two other env. variable mimicking how the CGI
program is invoked:

   QUERY_STRING="host=myhost&service=la&graph_width=576&graph_height=120&disp=myhost&nostale&color=green&graph=hourly&action=view"
   REQUEST_METHOD="GET"
   SCRIPT_NAME="hobbitgraph.sh"
   export QUERY_STRING REQUEST_METHOD SCRIPT_NAME

then run "bbcmd hobbitgraph.cgi --debug >/tmp/graph.out".  The top of 
"graph.out" is the debugging output. Should be like this:

2007-02-10 23:16:35 rrdgraph
2007-02-10 23:16:35 -
2007-02-10 23:16:35 --title
2007-02-10 23:16:35 myhost CPU Load Last 48 Hours
2007-02-10 23:16:35 -w576
2007-02-10 23:16:35 -h120
2007-02-10 23:16:35 -v
2007-02-10 23:16:35 Load
2007-02-10 23:16:35 -a
2007-02-10 23:16:35 PNG
2007-02-10 23:16:35 -s e-48h
2007-02-10 23:16:35 DEF:avg=la.rrd:la:AVERAGE
2007-02-10 23:16:35 CDEF:la=avg,100,/
2007-02-10 23:16:35 AREA:la#00CC00:CPU Load Average
2007-02-10 23:16:35 -u 1.0
2007-02-10 23:16:35 GPRINT:la:LAST: \: %5.1lf (cur)
2007-02-10 23:16:35 GPRINT:la:MAX: \: %5.1lf (max)
2007-02-10 23:16:35 GPRINT:la:MIN: \: %5.1lf (min)
2007-02-10 23:16:35 GPRINT:la:AVERAGE: \: %5.1lf (avg)\n
2007-02-10 23:16:35 COMMENT:Updated: 10-Feb-2007 23:16:35

Each line is one of the arguments to the "rrd_graph()" function call.
You can generate the exact same graph image using the rrdtool program:

cd ~hobbit/data/rrd/myhost
rrdtool graph \
	- \
	--title \
	"myhost CPU Load Last 48 Hours" \
	-w576 \
	-h120 \
	-v \
	Load \
	-a \
	PNG \
	-s e-48h \
	"DEF:avg=la.rrd:la:AVERAGE" \
	"CDEF:la=avg,100,/" \
	"AREA:la#00CC00:CPU Load Average" \
	-u 1.0
	"GPRINT:la:LAST: \: %5.1lf (cur)" \
	"GPRINT:la:MAX: \: %5.1lf (max)" \
	"GPRINT:la:MIN: \: %5.1lf (min)" \
	"GPRINT:la:AVERAGE: \: %5.1lf (avg)\n"
	"COMMENT:Updated: 10-Feb-2007 23:16:35"    >/tmp/mygraph.png

Then take a look at the /tmp/mygraph.png file in your browser and see if it
has the same problem. If it does, then it's purely an rrdtool problem.


Regards,
Henrik




More information about the Xymon mailing list