Norman Elton | 5 Jun 2009 16:25
Picon
Gravatar

PATCH: Proper labeling of multi-target graphs

Multitarget graphs normally label each line using the datasource name,
ignoring any display_name. This meant that individual graphs used the
"friendly" name, while multitarget graphs were somewhat cryptic. We
assigned this to one of our ace undergraduate programming students,
who whipped up a patch to fix the problem. I'll attach below. Once
applied, multitarget graphs will use the display_name.

Enjoy!

Norman Elton
College of William & Mary

========

diff -Naur ./cricket-1.0.5/grapher.cgi ./cricket-1.0.5.work/grapher.cgi
--- cricket-1.0.5/grapher.cgi	2004-02-06 11:27:34.000000000 -0500
+++ cricket-1.0.5.work/grapher.cgi	2009-06-05 09:42:36.000000000 -0400
 <at>  <at>  -941,7 +941,11  <at>  <at> 

         if ($rrd && $rrd->loadHeader()) {
             if (($isMTargets) && (!$isMTargetsOps))  {
-                print "Values at last update for $tname:<br>";
+                if(exists($targRef->{'display-name'})) {
+                    print "Values at last update for
$targRef->{'display-name'}:<br>";
+                } else {
+                    print "Values at last update for $tname:<br>";
+                }
             }  elsif (!$printOnce)  {
                 print "Values at last update:<br>";
(Continue reading)

Francois Mikus | 5 Jun 2009 18:00
Favicon
Gravatar

Re: PATCH: Proper labeling of multi-target graphs

Hello,

Great stuff.

I will review and apply it to cvs.

Cheers,

Francois Mikus

Norman Elton wrote:
> Multitarget graphs normally label each line using the datasource name,
> ignoring any display_name. This meant that individual graphs used the
> "friendly" name, while multitarget graphs were somewhat cryptic. We
> assigned this to one of our ace undergraduate programming students,
> who whipped up a patch to fix the problem. I'll attach below. Once
> applied, multitarget graphs will use the display_name.
>
> Enjoy!
>
> Norman Elton
> College of William & Mary
>
> ========
>
> diff -Naur ./cricket-1.0.5/grapher.cgi ./cricket-1.0.5.work/grapher.cgi
> --- cricket-1.0.5/grapher.cgi	2004-02-06 11:27:34.000000000 -0500
> +++ cricket-1.0.5.work/grapher.cgi	2009-06-05 09:42:36.000000000 -0400
>  <at>  <at>  -941,7 +941,11  <at>  <at> 
>
(Continue reading)

Paul Ward | 8 Jun 2009 02:59

Cricket Graphs Help needed

Hi All,

We are using Cricket to generate graphs of cpu, network data etc.

The current url used looks like the following URL

http://postmon2/cricket/grapher.cgi?target=%2FSolaris%2FPOLLUX%2Fdevice-traffic;view=traffic;ranges=d

Is there any way I can refine the data displayed so I can specify a
particular day ie June 05th. How about time of day as well?

I am new to RRD and cricket and am struggling to work out if this is
possible and how it's done.

Help please.

Paul

--

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
Oliver Landsmann | 13 Jun 2009 11:03
Picon

Re: Cricket Graphs Help needed

Hi Paul,

Due to the nature of RRD (and how cricket is creating the database) you 
will only have the current day (24 hours) in detail. That is the 
advantage of on RRD database, once created it does not grow in size. 
Have a look at http://en.wikipedia.org/wiki/RRDtool . That should 
explain what you can expect from this kind of data storage.

Br,
  Oliver

Paul Ward wrote:
> Hi All,
>
> We are using Cricket to generate graphs of cpu, network data etc.
>
> The current url used looks like the following URL
>
> http://postmon2/cricket/grapher.cgi?target=%2FSolaris%2FPOLLUX%2Fdevice-traffic;view=traffic;ranges=d
>
> Is there any way I can refine the data displayed so I can specify a
> particular day ie June 05th. How about time of day as well?
>
> I am new to RRD and cricket and am struggling to work out if this is
> possible and how it's done.
>
> Help please.
>
> Paul
>
(Continue reading)

Jon Martin | 18 Jun 2009 15:46

Stacking targets

Hello,

I'm interesting in creating a stack type graph out of similar 
datasources from several targets of the same type.  For example, an 
area,stack,stack,stack graph using the ifOutOctets from 4 different 
interfaces.  In a way, it would be like a mtarget sum but with the 
details of each of the contributing targets drawn as areas.  I see in 
the Cricket reference document that there are 4 draw-as values AREA, 
LINE1, LINE2 and LINE3.  No STACK?  Is there a way to do this from 
within cricket?

Here is a interpretation of what I want to do in raw rrd.

/usr/bin/rrdtool graph image.png \
        --imgformat=PNG \
        --start=-151200 \
        --end=-300 \
        --rigid \
        --base=1000 \
        --height=180 \
        --width=560 \
        --alt-autoscale-max \
DEF:aout="interface0.rrd":ds0:AVERAGE  \
DEF:bout="interface1.rrd":ds0:AVERAGE  \
DEF:cout="interface2.rrd":ds0:AVERAGE  \
DEF:dout="interface3.rrd":ds0:AVERAGE  \
AREA:aout#FF7373:"Channel0\t"  \
STACK:bout#FF4040:"Channel1\t"  \
STACK:cout#FF0000:"Channel2\t"  \
STACK:dout#A60000:"Channel3\n"  \
(Continue reading)


Gmane