[collectd] baffled by tail regex

Florian Forster octo at verplant.org
Thu Apr 29 10:13:02 CEST 2010

Hi Clay,

On Sun, Apr 25, 2010 at 11:46:21AM -0700, Clay Loveless wrote:
> I'm tailing a log file, looking for a number. My tail config looks like this:
>       Regex "monitor_lighty_hosts__splunkalerts.*result_count=(\d+)"
>       DSType "CounterSet"

> 04-25-2010 18:35:14.087 INFO … result_count=31, …

> Every flavor of regular expression I've tried for picking out the result_count seems to be failing. Variants I've tried, all of which work outside of collectd, are:
>     <Type "counter">
>       Instance "lighty_hostcount"
>       WarningMin 31
>     </Type>

Please note that the threshold configuration operates on the *rate* of
counters, not on the raw counter values. So if you want to match the
"31" from the logfile as-is, you should use a GAUGE data source for
this. The wiki page "Data source" [0] has a thorough explanation of the

> Message: Host i-ad3d7cc5, plugin tail (instance splunk-scheduler-log)
> type counter (instance lighty_hostcount): Data source "value" is
> currently 0.000000. That is below the warning threshold of 31.000000.
> Why aren't any of my regex flavors matching?

You do get a number, thus the regexes do match.


[0] <http://collectd.org/wiki/index.php/Data_source>
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100429/46988067/attachment.pgp 

More information about the collectd mailing list