How to debug showgraph.sh?
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?
(I have 4 client status pages for a local test which are not showing a graph, but are showing a link where the graph should be. The corresponding 'trends' page shows the graphs (so obviously RRD is working okay, and the graphs do exist). Also I have one client which does show the graph on the status page. So I want to see why one works and four fail.)
Thanks,
John.
-- John Horne Tel: +44 (0)1752 587287 Plymouth University, UK Fax: +44 (0)1752 587001
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&gra...
(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
Regards, Henrik
You could also insert this into showgraph.sh
env > /tmp/showgraph.out
to save the query string and other things. Add in the export & xymoncmd lines and you have a script to fiddle with.
Ralph Mitchell On Jul 27, 2012 4:09 PM, "Henrik Størner" <henrik at hswn.dk> 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<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 <http://jorn.hswn.dk> &service=la&graph_width=864&**graph_height=180&disp=jorn.**hswn.dk<http://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
Regards, Henrik
______________________________**_________________ Xymon mailing list Xymon at xymon.com http://lists.xymon.com/**mailman/listinfo/xymon<http://lists.xymon.com/mailman/listinfo/xymon>
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&gra...
(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: +44 (0)1752 587287 Plymouth University, UK Fax: +44 (0)1752 587001
participants (3)
-
henrik@hswn.dk
-
john.horne@plymouth.ac.uk
-
ralphmitchell@gmail.com