[collectd] Question about curl plugin and regexps

Martin B. Smith smithmb at ufl.edu
Thu Feb 17 02:33:48 CET 2011

On 2/16/2011 3:50 AM, Amos Shapira wrote:
> When I saw regexp used in collectd configuration file (using the tail
> plugin) it was double quoted, ie \\ for \.

Hi Amos,

Thank you for the tip. That made it so my regexp did start matching. I
couldn't tell if the vertical pipe needed the double-escape or not.

Could you also explain why only my first <Match> actually gets results
given the output:

> active_users_count|3|3|
> active_users_5mins|0|0|
> active_users_30mins|1|1|
> active_users_60mins|1|1|

My matches look like:

    Regex "active_users_count\\|([0-9]+)"
    DSType "GaugeLast"
    Type "my_users"
    Instance "active_users_count"
    Regex "active_users_5mins\\|([0-9]+)"
    DSType "CounterSet"
    Type "my_users"
    Instance "active_users_5mins"
    Regex "active_users_30mins\\|([0-9]+)"
    DSType "CounterSet"
    Type "my_users"
    Instance "active_users_30mins"

It seems weird that only the first match now returns data. Does only one
match apply per Page URL?

Martin B. Smith
smithmb at ufl.edu - (352) 273-1374
CNS/Open Systems Group
University of Florida

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5497 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110216/871f93f8/attachment.bin>

More information about the collectd mailing list