Xymon Mailing List Archive search

How to debug showgraph.sh?

list John Horne
Mon, 30 Jul 2012 13:55:41 +0100
Message-Id: <user-67bb7e248f08@xymon.invalid>

On Fri, 2012-07-27 at 22:09 +0200, Henrik Størner wrote:
On 27-07-2012 18:41, John Horne wrote:
Hello,

I'm sure I saw a way to run showgraph.sh from the command-line in order
to debug problems with it. As far as I remember it required setting the
variable QUERY and perhaps some others before running it. I have looked,
but cannot find how this was done.

Can anyone offer any help here?
If you have a graph link in your browser like

http://www.xymon.com/xymon-cgi/showgraph.sh?host=jorn.hswn.dk&service=la&graph_width=864&graph_height=180&disp=jorn.hswn.dk&nostale&color=green&graph_start=1343160394&graph_end=1343419594&graph=hourly&action=view

(taken from the "cpu" graph on the www.xymon.com site), then you can run 
it "by hand" with:


REQUEST_METHOD=GET
SCRIPT_NAME=showgraph.sh
QUERY_STRING="host=jorn.hswn.dk&service=la&graph_width=864&graph_height=180&disp=jorn.hswn.dk&nostale&color=green&graph_start=1343160394&graph_end=1343419594&graph=hourly&action=view" 
(i.e. everything after the "?" in the URL)

export REQUEST_METHOD SCRIPT_NAME QUERY_STRING

xymoncmd showgraph.cgi
Hello,

Thanks for that. It was just what I wanted.

Turns out that the error I'm getting is 'No DS called 'in' in
'ifstat.eth0.rrd'. However, my test is called 'if', not 'ifstat'.

It seems that the entry I had in graphs.cfg was 'FNPATTERN
^if.(.+).rrd' (which would match the previous 'ifstat' entry). Changing
my pattern to '^if\.' sorted out the problem :-)

Now I have to work out why the one graph for one client I did have for
the 'if' test appeared - it seems that the client has no 'Network
traffic' graphs at all (or RRD files) so something with the netstat or
ifconfig data must be causing a problem. (Both do exist in the client
data.)


John.

-- 
John Horne                   Tel: +XX (X)XXXX XXXXXX
Plymouth University, UK      Fax: +XX (X)XXXX XXXXXX