[collectd] Generalized ignorelist functionality
octo at verplant.org
Fri Nov 24 10:06:33 CET 2006
On Wed, Nov 22, 2006 at 03:54:09PM +0100, Lubo?? Stan??k wrote:
> To summarize:
> - "string" - means full match string -> will be converted to ^string$
Yes, but `"string.with.dots"' needs to be converted to
`^string\.with\.dots$' to match literal dots. Likewise for other special
characters. I'm still undecided if this really is a good idea, or if the
little code necessary to use `strcmp' in those cases isn't simpler.
> - any other string:
> - string - means partial match -> no conversion, append as regex
> - ^string$ - means full match regex -> no conversion, append as regex
Yes, but this is the same case, no special treatment necessary.
> The user is responsible for providing prefixed characters (if any)
> inside any variant.
With strings I don't know. _Why_ would you escape a dot in a string?
Also, what about `"String with \"quote\""'? As it is, we simply strip
the leading and trailing quote, so the backslashes are matched
literally. IMHO that's unintuitive, too..
Another though has crossed my mind: Why not require both, either
with any other leading character `[^"/]' throwing an error? I really am
undecided here ;)
> The last problem is that the user does not have any tool to check or
> test his own expressions.
> The log contains only error messages in cases where the regex cannot
> be compiled.
That's right to a point - you can always use `echo' and `egrep' to test
your expressions ;) Anyway, what do you suggest?
Florian octo Forster
Hacker in training
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20061124/dc3adb57/attachment.pgp
More information about the collectd