Discussion:
[cricket-users] Multiples views of same data
Stephen Carville
2010-05-12 23:42:54 UTC
Permalink
Is there a way to use the same data set in different views with different
draw-as directives?

I currently gather some basic data on one of our web sites:

datasource latf-login
ds-source = "exec:0: /var/bbuser/bin/latfdata %bbdatadir%/%latfdatafile%"
rrd-ds-type = GAUGE

datasource latf-follow-link
ds-source = "exec:1: /var/bbuser/bin/latfdata %bbdatadir%/%latfdatafile%"
rrd-ds-type = GAUGE

datasource latf-submit-form
ds-source = "exec:2:/var/bbuser/bin/latfdata %bbdatadir%/%latfdatafile%"
rrd-ds-type = GAUGE

datasource latf-dl-pdf
ds-source = "exec:3:/var/bbuser/bin/latfdata %bbdatadir%/%latfdatafile%"
rrd-ds-type = GAUGE

targetType = latf-times
ds = "latf-login, latf-follow-link, latf-submit-form, latf-dl-pdf"
view = "latf-performance"

view latf-performance
elements = "latf-login latf-follow-link latf-submit-form latf-dl-pdf"

Is there any way to use the same data gathered above but in a different view.
Specifically I'd like to have one normal line graph and another with the data
stacked.

Maybe define one datasource in terms of another?
--
Stephen Carville <***@lereta.com>
Systems Engineer
Lereta LLC.
============================================================
Cum ulla sella in pugno taberna
Kiss Gabor (Bitman)
2010-05-13 12:14:30 UTC
Permalink
Post by Stephen Carville
Is there a way to use the same data set in different views with different
draw-as directives?
datasource latf-login
ds-source = "exec:0: /var/bbuser/bin/latfdata %bbdatadir%/%latfdatafile%"
rrd-ds-type = GAUGE
datasource latf-follow-link
ds-source = "exec:1: /var/bbuser/bin/latfdata %bbdatadir%/%latfdatafile%"
rrd-ds-type = GAUGE
datasource latf-submit-form
ds-source = "exec:2:/var/bbuser/bin/latfdata %bbdatadir%/%latfdatafile%"
rrd-ds-type = GAUGE
datasource latf-dl-pdf
ds-source = "exec:3:/var/bbuser/bin/latfdata %bbdatadir%/%latfdatafile%"
rrd-ds-type = GAUGE
targetType = latf-times
ds = "latf-login, latf-follow-link, latf-submit-form, latf-dl-pdf"
view = "latf-performance"
view latf-performance
elements = "latf-login latf-follow-link latf-submit-form latf-dl-pdf"
Is there any way to use the same data gathered above but in a different view.
Specifically I'd like to have one normal line graph and another with the data
stacked.
Line type and stacking is described in Graph Dictionary rather than
View. The Cricket Reference guide writes:

| Each named graph dictionary entry (not --default--) should share the name of
| a datasource dictionary entry. In this respect, the graph dictionary could be
| merged with the datasource dictionary.

In other words each Graph belongs to one and only one Datasource and
vice versa. If you need different visual representations of the
same info you have to create several Datasources based on the same
DS-Source.
As far as I understand. :-)

Gabor
Stephen Carville
2010-05-13 18:31:32 UTC
Permalink
Post by Kiss Gabor (Bitman)
Line type and stacking is described in Graph Dictionary rather than
| Each named graph dictionary entry (not --default--) should share the name
| of a datasource dictionary entry. In this respect, the graph dictionary
| could be merged with the datasource dictionary.
In other words each Graph belongs to one and only one Datasource and
vice versa. If you need different visual representations of the
same info you have to create several Datasources based on the same
DS-Source.
As far as I understand. :-)
Thanks.

That's pretty much the way I see it too. I was hoping someone might know a
workaround Maybe define one datasouce as a copy of another like:

datasource latf-login
ds-source = "exec:0:/var/bbuser/bin/latfdata %bbdatadir%/%latfdatafile%"
rrd-ds-type = GAUGE

datasource latf-login-stack
ds-source = COPY:latf-login
rrd-ds-type = GAUGE

I know COPY is not a keyword. The above is just an example.

I've been playing at adapting Cricket to use the CGI::Application framework.
so maybe I'll just add a COPY function.
--
Stephen Carville <***@lereta.com>
Systems Engineer
Lereta LLC.
============================================================
Cum ulla sella in pugno taberna
Chris Adams
2010-05-13 18:46:44 UTC
Permalink
Post by Stephen Carville
datasource latf-login
ds-source = "exec:0:/var/bbuser/bin/latfdata %bbdatadir%/%latfdatafile%"
rrd-ds-type = GAUGE
datasource latf-login-stack
ds-source = COPY:latf-login
rrd-ds-type = GAUGE
You could do something like this:

datasource latf-login-stack
rrd-ds-type = COMPUTE
ds-source = ds0

You have to know what the name of the source DS is in the RRD. The
default names them ds0, ds1, ds2, ... in the order they appear in the
target definition. If you set "$gLongDSName=1" in your cricket-conf.pl,
I think the ds-source would actually be "latf-login" (I haven't played
with that option in a while though, so I could be remembering wrong).
--
Chris Adams <***@hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
Kiss Gabor (Bitman)
2010-05-13 19:01:42 UTC
Permalink
Post by Stephen Carville
datasource latf-login
ds-source = "exec:0:/var/bbuser/bin/latfdata %bbdatadir%/%latfdatafile%"
rrd-ds-type = GAUGE
datasource latf-login-stack
ds-source = COPY:latf-login
rrd-ds-type = GAUGE
I know COPY is not a keyword. The above is just an example.
Just write

datasource latf-login
ds-source = "exec:0:/var/bbuser/bin/latfdata %bbdatadir%/%latfdatafile%"
rrd-ds-type = GAUGE

datasource latf-login-stack
ds-source = "exec:0:/var/bbuser/bin/latfdata %bbdatadir%/%latfdatafile%"
rrd-ds-type = GAUGE

"latfdata" will be executed only once and data will be cached for later use.

Gabor
--
Most maszik ki a majom a vizbol.
John Hutchinson
2010-06-24 18:25:04 UTC
Permalink
I have 4 dsl's running to the same location I need a way to create one graph
with the bandwidth added from each circuit to form a total usage for that
location. I cannot seem to find how to do this in cricket.

John
c3
2010-06-24 19:05:49 UTC
Permalink
You can use the compute DS, but be aware the nan does not add. A single
missed datapoint in any source will yield nan for the compute.

http://oss.oetiker.ch/rrdtool/tut/index.en.html
Post by John Hutchinson
I have 4 dsl's running to the same location I need a way to create one graph
with the bandwidth added from each circuit to form a total usage for that
location. I cannot seem to find how to do this in cricket.
John
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
cricket-users mailing list
https://lists.sourceforge.net/lists/listinfo/cricket-users
John Hutchinson
2010-06-24 19:33:56 UTC
Permalink
Is there any where that I can see an example of how to do this??

-----Original Message-----
From: c3 [mailto:***@c3c1.com]
Sent: Thursday, June 24, 2010 3:06 PM
To: cricket-***@lists.sourceforge.net
Subject: Re: [cricket-users] agrigated view of multiple devices

You can use the compute DS, but be aware the nan does not add. A single
missed datapoint in any source will yield nan for the compute.

http://oss.oetiker.ch/rrdtool/tut/index.en.html
Post by John Hutchinson
I have 4 dsl's running to the same location I need a way to create one graph
with the bandwidth added from each circuit to form a total usage for that
location. I cannot seem to find how to do this in cricket.
John
----------------------------------------------------------------------------
--
Post by John Hutchinson
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
cricket-users mailing list
https://lists.sourceforge.net/lists/listinfo/cricket-users
----------------------------------------------------------------------------
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
c3
2010-06-24 19:36:18 UTC
Permalink
http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html
Post by John Hutchinson
Is there any where that I can see an example of how to do this??
-----Original Message-----
Sent: Thursday, June 24, 2010 3:06 PM
Subject: Re: [cricket-users] agrigated view of multiple devices
You can use the compute DS, but be aware the nan does not add. A single
missed datapoint in any source will yield nan for the compute.
http://oss.oetiker.ch/rrdtool/tut/index.en.html
Post by John Hutchinson
I have 4 dsl's running to the same location I need a way to create one
graph
Post by John Hutchinson
with the bandwidth added from each circuit to form a total usage for that
location. I cannot seem to find how to do this in cricket.
John
Rick Frey
2010-06-24 20:30:06 UTC
Permalink
You may want to try using mtargets with mtargets-ops of "sum()".
mtarget is kind of a virtual target that is only used by the grapher.
Common to graph multiple data sources in a single graph in this manner.
This allows you to add/delete targets in future without losing past
data. You can also set unknown-is-zero if you want to show missing data
as 0 instead of NaN.

Sample config
target sumDslLinks
target-type =<same target type as your individual dsl targets>
mtargets = "dsl1; dsl2; dsl3; dsl4"
mtargets-ops = sum()
unknown-is-zero = true


See http://cricket.sourceforge.net/support/doc/reference.html for more
detail.
Post by c3
http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html
Post by John Hutchinson
Is there any where that I can see an example of how to do this??
-----Original Message-----
Sent: Thursday, June 24, 2010 3:06 PM
Subject: Re: [cricket-users] agrigated view of multiple devices
You can use the compute DS, but be aware the nan does not add. A single
missed datapoint in any source will yield nan for the compute.
http://oss.oetiker.ch/rrdtool/tut/index.en.html
Post by John Hutchinson
I have 4 dsl's running to the same location I need a way to create one
graph
Post by John Hutchinson
with the bandwidth added from each circuit to form a total usage for that
location. I cannot seem to find how to do this in cricket.
John
Oliver Landsmann
2010-06-24 19:41:31 UTC
Permalink
Hi,

that is one of the easy tasks of cricket. Look for mtargets in the
reference documentation
http://cricket.sourceforge.net/support/doc/reference.html

so for example (this is from the top of my head, so there might be small
errors):

target all_in_one_graph
mtargets = "dsl1;dsl2;dsl3;dsl4"
mtargets-ops = sum()
target-type = dls_line_bandwith

of course i just made the names up :)

You would need to supply your config for a more tailored example.

Br,
Oliver

Btw. pointing out RRD tools documentation is not that helpful to
configure cricket ;)
Post by c3
http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html
Post by John Hutchinson
Is there any where that I can see an example of how to do this??
-----Original Message-----
Sent: Thursday, June 24, 2010 3:06 PM
Subject: Re: [cricket-users] agrigated view of multiple devices
You can use the compute DS, but be aware the nan does not add. A single
missed datapoint in any source will yield nan for the compute.
http://oss.oetiker.ch/rrdtool/tut/index.en.html
Post by John Hutchinson
I have 4 dsl's running to the same location I need a way to create one
graph
Post by John Hutchinson
with the bandwidth added from each circuit to form a total usage for that
location. I cannot seem to find how to do this in cricket.
John
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
cricket-users mailing list
https://lists.sourceforge.net/lists/listinfo/cricket-users
Continue reading on narkive:
Loading...