Stephen Carville | 13 May 2010 01:42

Multiples views of same data

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  
(Continue reading)

Kiss Gabor (Bitman | 13 May 2010 14:14
Picon

Re: Multiples views of same data

> 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  
(Continue reading)

Stephen Carville | 13 May 2010 20:31

Re: Multiples views of same data

On Thursday 13 May 2010 05:14, Kiss Gabor (Bitman) wrote:
> 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. :-)

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. 
(Continue reading)

Chris Adams | 13 May 2010 20:46

Re: Multiples views of same data

Once upon a time, Stephen Carville <scarville <at> lereta.com> said:
> 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 <cmadams <at> hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.

------------------------------------------------------------------------------
Kiss Gabor (Bitman | 13 May 2010 21:01
Picon

Re: Multiples views of same data

> 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.

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.

------------------------------------------------------------------------------
(Continue reading)


Gmane