[collectd] Question about curl plugin and regexps

Amos Shapira amos.shapira at gmail.com
Wed Feb 16 09:50:14 CET 2011


When I saw regexp used in collectd configuration file (using the tail
plugin) it was double quoted, ie \\ for \.

Sent from my phone. Please excuse my brevity.
On 16/02/2011 9:18 AM, "Martin B. Smith" <smithmb at ufl.edu> wrote:
> Howdy there folks,
>
> I have the following text/plain output from a CGI script:
>
> active_users_count|3|3|
> active_users_5mins|0|0|
> active_users_30mins|1|1|
> active_users_60mins|1|1|
>
> I'm configuring the curl plugin to read them:
>
> LoadPlugin curl
> <Plugin curl>
> <Page "my_users">
> URL "http://localhost/cgi-script"
> <Match>
> Regex "active_users_count\|([0-9]+)"
> DSType "GaugeLast"
> Type "my_users"
> Instance "active_users_count"
> </Match>
> </Page>
> </Plugin>
>
> In types.db, I've got:
> my_users value:GAUGE:0:65535
>
> Am I misunderstanding the amount of escaping I need to do for a vertical
> pipe in my configuration? Is the Regex match supposed to be multiline?
>
> I've tried to match on "^active_users_count\|([0-9]+)$" too.
>
> Thanks in advance,
> --
> Martin B. Smith
> smithmb at ufl.edu - (352) 273-1374
> CNS/Open Systems Group
> University of Florida
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110216/ae206045/attachment.htm>


More information about the collectd mailing list