<div dir="ltr">On Mon, Aug 11, 2008 at 8:53 AM, Bill Richardson <span dir="ltr"><<a href="mailto:wrichardson@llbean.com">wrichardson@llbean.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div>
<div dir="ltr" align="left"><font size="2" face="Arial"><span><span>I have looked high and
low for a way to change how custom rrd's are created in
hobbit.</span></span></font></div>
<div dir="ltr" align="left"><font size="2" face="Arial"><span><span></span></span></font> </div>
<div dir="ltr" align="left"><font size="2" face="Arial"><span><span>I have created a custom
script to graph and have 2 problems that I would like to figure
out.</span></span></font></div>
<div dir="ltr" align="left"><font size="2" face="Arial"><span><span></span></span></font> </div>
<div dir="ltr" align="left"><font size="2" face="Arial"><span><span>1.) I would like to
change the step from 300 secs to 60 secs in the rrd's and run the script
ever 60 secs instead of 300 secs. "The default rrd behavior is set to 300
secs"</span></span></font></div>
<div dir="ltr" align="left"><font size="2" face="Arial"><span><span>2.) I would like to get
the true values not average. The problem is I have data that I want to
graph that can range from 0 to 5 "thats 0, 1, 2, 3, 4 or 5" and
the graph shows average so my graphs come out with numbers like 6m "6 milli" for
a true value of 2 and so on. The problem is the data will sit a 0 for
an hour or more and then go to 1 or 2 for just one sample. Average is not
the right choice and I cant get the true figures I 'm looking
for.</span></span></font></div>
<div dir="ltr" align="left"><font size="2" face="Arial"><span><span></span></span></font> </div>
<div dir="ltr" align="left"><font size="2" face="Arial"><span><span> Seems like the way
to do this is in the hobbitserver.cfg. </span></span></font><font size="2" face="Arial"><span><span>I added the
following to the hobbitserver.cfg</span></span></font></div>
<div dir="ltr" align="left"><font size="2" face="Arial"><span><span></span></span></font> </div>
<div dir="ltr" align="left"><span>NCV_<span>testgraph</span>="<span>test1</span>total:GAUGE,<span>test2</span>total:GAUGE,<span>test3t</span>otal:GAUGE"</span></div><span></span></div>
<div><span><font face="Arial"><font size="2"></font></font></span> </div>
<div><span><font>
<div dir="ltr" align="left"><span></span><font face="Arial"><font size="2">W<span>hat other values can you
pass to rrd other than GAUGE? Can I set a step to say 60 instead or 300 and can
I change the default behavior of AVERAGE to something else that may work for my
above example? The rrd docs are not clear on
this.</span><br></font></font></div></font></span>
<div><font size="2" face="Arial"></font> </div>
<div><span><font size="2" face="Arial">Early on I was
thinking that maybe I could fix the AVERAGE problem with a change to the
hobbitgraph.cfg but this is what I found:</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial"><font size="2"><span>T</span>he hobbitgraph.cfg does not have
any effect on <span>how</span> rrd file is
created. I deleted the <span>testgraph</span>.rrd
made the changes to hobbitgraph.cfg and no go. You cant see the
graphs <span>if you use anything but AVERAGE
</span>after changing the hobbitgraph.cfg. It looks like the *.rrd's are
created by default "AVERAGE" and you just edit the hobbitgraph.cfg to
view whats already built. I need to figure out how to change the way the
rrd's are built and its not thru
the hobbitgraph.cfg.</font></font></span></div></div></div></blockquote><div><br>If you're comfortable about fooling with the source, there are a couple of places where you can make changes to achieve what you want:<br>
<br>hobbit-4.2.0/hobbitd/do_rrd.c contains these definitions:<br><br> static char rra1[] = "RRA:AVERAGE:0.5:1:576";<br> static char rra2[] = "RRA:AVERAGE:0.5:6:576";<br> static char rra3[] = "RRA:AVERAGE:0.5:24:576";<br>
static char rra4[] = "RRA:AVERAGE:0.5:288:576";<br><br>BUT - if you change those, I think *every* new rrd created by Hobbit would pick up the same changes. <br><br>do_rrd.c also includes a bunch of test-specific files, one of which is hobbitd/rrd/do_ncv.c. That contains the code that examines NCV_xxx and sets up DS entries to match.:<br>
<br> sprintf(dsdef, "DS:%s:%s:600:0:U", dsname, dstype);<br>or<br> sprintf(dsdef, "DS:%s:DERIVE:600:0:U", dsname);<br></div></div><br>A bit further down it copies in the above rra1 - rra4 definitions. So, you could change the hardwired DS and RRA values in do_ncv.c, but ONLY if you don't have any other NCV that would need to be different...<br>
<br>Another way to get towards what you want would be to hand-create the rrd. Hobbit won't overwrite an existing rrd. I think the rrdcreate would look something like this:<br><br> rrdtool create testgraph \<br> DS:<span><span>test1</span>total:GAUGE:60:0:U \<br>
DS:<span>test2</span>total:GAUGE:60:0:U \<br> DS:<span>test3t</span>otal:GAUGE</span>:60:0:U \<br> RRA:AVERAGE:0.5:1:576 \<br>
RRA:AVERAGE:0.5:6:576 \<br>
RRA:AVERAGE:0.5:24:576 \<br>
RRA:AVERAGE:0.5:288:576<br><br>I haven't tried this myself, but I think Hobbit would be able to do updates correctly.<br><br>Ralph Mitchell<br><br></div>