Debug graph problems

Docs: 
If you have strange graphs, there is a way to create the graphs like hobbit should do. You can completely remove any Xymon code from the graph generation and see if the graph image still looks weird.

find the needed options

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 environment 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

find the rrdtool options

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.

Generate graph from command line

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. (this info comes from a post Henrik made on the hobbit mailing list on 2007-02-10 23:32 titled Re: [hobbit] Graphs are fuzzy and distorted : Solaris 8/sparc)