[collectd] Question about curl plugin and regexps

Martin B. Smith smithmb at ufl.edu
Tue Feb 15 23:18:05 CET 2011


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 --------------
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/20110215/d41cc8bc/attachment.bin>


More information about the collectd mailing list