[drraw-users] Question about templates
Christophe Kalt
kalt at taranis.org
Wed Sep 13 08:36:45 EDT 2006
On Sep 12, Frans Haarman wrote:
| On 9/12/06, Frans Haarman <franshaarman at gmail.com> wrote:
| > On 9/12/06, Sven Probst <Sven.Probst at wdr.de> wrote:
| > > try (.*) not .* .
| > > This is the correct syntax..
| >
| > Ok I started fresh, with the above reg-ex I get some more results. great!
|
| I think I am just an idiot with reg-expressions.
|
| WHERE is the Base Regular Expression applied ? The full path to the
| database files ?
In the same table as the one where you have to define the
regular expressions, the last few rows contain the various
filenames present/used in the original graph. All the regular
expressions apply to these filenames, e.g. they are not full
paths in the OS sense of the term.
| For example, tutorials suggest that: ~= m/snmp/; should be positive
| for all files which have "snmp". However I never get hits with the
| drraw.cgi.
|
| I tried: snmp(.*)\.rrd, also without result. I think I just need a
| cluebat cause its just very weird.
|
| any pointers would be very helpfull!!
The base regular expression must to more than match the
filenames. It must also define at least one subexpression
(e.g. you need a part between parentheses). The subexpression
is what you can then use to form the filenames (in the later
rows) as well as what makes the choices for the user wanting
to choose one graph to create.
In general (although it does not always work), all you need to
define is the "Base Regular Expression", click "Update" and
drraw will fill up the bottom of the table based on what you
entered.
If you're a bit more familiar with Perl regexps now, try and
read drraw's help on templates again. It's short and far from
great, but the example may be enough to help you. Ultimately,
once you get it, it'd be great if you could send me an updated
text for the help :-)
Christophe
More information about the drraw-users
mailing list