<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16437"></HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV dir=ltr align=left><SPAN class=565354111-12122011><FONT size=2
face=Arial>Hi David,</FONT></SPAN></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><SPAN class=565354111-12122011><FONT size=2 face=Arial>Many thanks for your
response. I can confirm that your work-around for this issue works.
I touched a file, and the CGI script now displays the new graph. :)
Maybe this requirement should be documented in the page I referenced
below? I think this could be a neat feature as it means that the graph
does not appear for all hosts... But I would like it (my modified version
of the disk1 graph) ideally on the disk status page for this host (in
addition to the standard disk graph). Any ideas on how to do
that?</FONT></SPAN></DIV><!-- Converted from text/rtf format -->
<P><SPAN lang=en-gb><FONT size=2 face=Arial>Kind regards,</FONT></SPAN> </P>
<P><SPAN lang=en-gb><FONT size=2 face=Arial>Seb<SPAN
class=565354111-12122011>A</SPAN></FONT></SPAN><BR><SPAN lang=en-gb><FONT
color=#808080 size=2 face=Arial> </FONT></SPAN> </P><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> xymon-bounces@xymon.com
[mailto:xymon-bounces@xymon.com] <B>On Behalf Of </B>David
Baldwin<BR><B>Sent:</B> 12 December 2011 01:27<BR><B>To:</B>
SebA<BR><B>Cc:</B> xymon@xymon.com<BR><B>Subject:</B> Re: [Xymon] Problem
adding GRAPHS in xymonserver.cfg (known bug?)<BR></FONT><BR></DIV>
<DIV></DIV>SebA,
<BLOCKQUOTE
cite=mid:!&!AAAAAAAAAAAuAAAAAAAAAL60wriLM9cRsTVojW0AAAABAFEdQVQs6tMRsLEAoMxarIMAAAABk2cAABAAAAAMFjyLhT+8R5FOQwcqj+8CAQAAAAA=@syntec.co.uk
type="cite">
<META name=GENERATOR content="MSHTML 9.00.8112.16437">
<DIV><FONT size=2 face=Arial><SPAN class=042032516-09122011>On the latest
version of Xymon trunk, I cannot get the GRAPHS= feature in xymonserver.cfg
to work as I would hope, following the instructions listed
here:</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN class=042032516-09122011><A
href="http://www.xymon.com/xymon/help/howtograph.html"
moz-do-not-send="true">http://www.xymon.com/xymon/help/howtograph.html</A></SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN class=042032516-09122011>If I add disk1
so it becomes:</SPAN></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2>GRAPHS="la,disk,disk1,<... lots more
...>,xymonproxy,xymond</FONT></FONT></DIV>
<DIV><SPAN class=042032516-09122011><FONT size=2 face=Arial>the disk1 graph
does not show up on the trends page. However, I know the disk1 graph
works, because I can view it by manipulating the URL generated when I click
on the disk graph. And I know the xymonserver.cfg file is being read
OK, because if I change disk to disk1 in the original line, the disk graph
disappears altogether. What's wrong?</FONT></SPAN></DIV><!-- Converted from text/rtf format --><BR></BLOCKQUOTE><FONT
size=2><FONT face=Arial>A problem I found a while ago with graphs in trends is
that you need to have directory entries of the form 'disk1.*.rrd' (wildcard
matching) - note they do not need to be the actual RRD files, since the graph
drawing uses the FNPATTERN line in the graph definition to find the correct
ones. Try doing a 'touch disk1.foo.rrd' in the rrd directory for the host you
are trying to get the disk1 graphs into the trends column for.<BR><BR>Below is
a summary I compiled of the issues in May 2009 (apologies for old-style
pathnames).<BR></FONT></FONT><PRE wrap="">I am building a range of graphs with devmon collecting RRD data. Some
RRD files contain multiple datasets with different units - e.g.
temperature and humidity.
I want all the graphs to appear in the trends column. Finally, after a
lot of stuffing around with different combinations, it appears that the
following conditions are required:
** RRD file name must exist starting with the graph/"service" name
* graph name must be listed in GRAPHS variable in hobbitserver.cfg
* doesn't matter if graph name is listed in TEST2RRD or not
So for the following graphs to work I created symlinks to env.*.rrd from
humidity.*.rrd - e.g.
# ls -l
total 120
-rw-rw-r-- 1 hobbit hobbit 38536 May 20 15:49 env.Rack2-Front.rrd
-rw-rw-r-- 1 hobbit hobbit 38536 May 20 15:49 env.Rack5(XRAID)-Rear.rrd
lrwxrwxrwx 1 root root 19 May 20 14:29 humidity.Rack2-Front.rrd
-> env.Rack2-Front.rrd
lrwxrwxrwx 1 root root 25 May 20 14:29
humidity.Rack5(XRAID)-Rear.rrd -> env.Rack5(XRAID)-Rear.rrd
-rw-rw-r-- 1 hobbit hobbit 19552 May 20 15:48 tcp.conn.rrd
In fact, I found it was sufficient just to 'touch' the RRD filename to
create an empty file - the graph CGI script uses the correct definition
and finds the specified RRD file.
Section of hobbitgraphs.cfg
[env]
FNPATTERN env\.(.+).rrd
TITLE Temperature
YAXIS Celsius
DEF:p@RRDIDX@=@RRDFN@:temp:AVERAGE
LINE2:p@RRDIDX@#@COLOR@:@RRDPARAM@
GPRINT:p@RRDIDX@:LAST: \: %5.1lf (cur)
GPRINT:p@RRDIDX@:MAX: \: %5.1lf (max)
GPRINT:p@RRDIDX@:MIN: \: %5.1lf (min)
GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
[humidity]
FNPATTERN env\.(.+).rrd
TITLE Humidity
YAXIS Percent
DEF:p@RRDIDX@=@RRDFN@:humidity:AVERAGE
LINE2:p@RRDIDX@#@COLOR@:@RRDPARAM@
GPRINT:p@RRDIDX@:LAST: \: %5.1lf (cur)
GPRINT:p@RRDIDX@:MAX: \: %5.1lf (max)
GPRINT:p@RRDIDX@:MIN: \: %5.1lf (min)
GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf (avg)\n
It took me a while to work out a testing harness for debugging the CGI
script, but I came up with the following shell script:
. /usr/lib/hobbit/server/etc/hobbitcgi.cfg
HOST=$1
SERVICE=trends
env REQUEST_URI=/hobbit-cgi/bb-hostsvc.sh?HOST=${HOST}\&SERVICE=$SERVICE
SCRIPT_NAME=/hobbit-cgi/bb-hostsvc.sh
QUERY_STRING=HOST=${HOST}\&SERVICE=$SERVICE REQUEST_METHOD=GET
/usr/lib/hobbit/server/bin/hobbitsvc.cgi $CGI_SVC_OPTS --debug
The debug output would show me the rrd files as they were found, and
allowed me to pin down that the graph name had to match the start of the
RRD filename.
There's probably a few bugs in all of this. It would be nice not to have
to create the RRD filenames by hand.
Thanks, David.
</PRE><BR><FONT size=2><FONT face=Arial><BR>David.<BR></FONT></FONT><PRE class=moz-signature cols="72">--
David Baldwin - Senior Systems Administrator (Datacentres + Networks)
Information and Communication Technology Services
Australian Sports Commission <A class=moz-txt-link-freetext href="http://ausport.gov.au">http://ausport.gov.au</A>
Tel 02 62147830 Fax 02 62141830 PO Box 176 Belconnen ACT 2616
<A class=moz-txt-link-abbreviated href="mailto:david.baldwin@ausport.gov.au">david.baldwin@ausport.gov.au</A> Leverrier Street Bruce ACT 2617
<FONT size=2 face=Arial></FONT></PRE></BLOCKQUOTE></BODY></HTML>