[drraw-users] Templates

brevius at tlen.pl brevius at tlen.pl
Wed May 13 01:21:13 MDT 2009


Finally I created working template :-) It looks as follow:
Basic RE: (.+)-lspvcstats-(.+)-.+
Selection RE: $1-$2
(.+)-lspvcstats-(.+)-(.+).rrd: $1-lspvcstats-$2-.+.rrd

Data Source Configuration has File RE:
(.+)-lspvcstats-(.+)-(.+).rrd
DS: bitsIn

The main idea is to chose from the templeate files basing on $1 and $2 values and create graph for following files:
$1-lspvcstats-$2-(.+).rrd

It woks - so the graph is created, but I'm wondering what I need to type in Label/Format field to get here part of the filename used fir graph creation.
In working graph (used to create the template) I simply used $1, but in this case $1 displays "1" for all files.
Do you have some hints?

Tomek

> > It seems to me that wiki example is not good. Please not that FileRE contains
> > strict directory names. So my experiences shows that this two RE are independent.
> > My config example is at http://www.man.poznan.pl/~tomeks/template.PNG
> 
> The portion in red is wrong.
> You're trying to combine 2 templating features which is fine, but more complex.
> 
> So you have this: [IP of the machine]-stattype-name1-name2.rrd
> If you want to restrict the graph to files ending in name2.rrd, this
> should be all you need:
> 
> Base RE: .+-stattype-.+-(.+)\.rrd
> Selection RE: $1
> .+\.1-stattype-(.+)-(.+)\.rrd: .+\.1-stattype-(.+)-$1\.rrd
> 
> 
> Another way to think about this is that you should have created that
> graph to start with.  Therefore, the "File RE" for the DS would have
> been: .+\.1-stattype-(.+)-name2\.rrd
> Then, and only then you convert the working graph to a Template where
> "name2" becomes a variable.
> 
> Hope this helps,
> Christophe




More information about the drraw-users mailing list