[collectd] Simple Tail plugin regex -- count lines

Martin B. Smith smithmb at ufl.edu
Mon Mar 14 19:33:33 CET 2011

On 03/14/2011 02:15 PM, Bob.Boldin at cox.com wrote:
> Martin,
>    The part I struggled with at first is the data is going to be converted into a rate - so the number represents Transactions per second.  I found on my use of tail I needed to increase the polling interval so that enough transactions were caught between polls to actually create meaningful data points.
> In the global section I went to:
> Interval 300
> 10,000 records in an hour would still only be 3 tps
> In my tail match section using:
>        DSType "CounterInc"
>        Type "invocations"
> Hope it helps

Hi Bob,

It looks like "invocations" is the same type as "derive." I think what I 
missed was that division by time -- that it's a rate, like you said. So 
what I'm seeing is "log lines per second" which makes sense for those 
numbers between 1-5.

I'm going to do two matches to solve my problem:

LoadPlugin "tail"
<Plugin "tail">
   <File "/var/log/shibboleth-idp/idp-audit.log">
     Instance "idp_audit_log"
       Regex ".*"
       DSType "CounterInc"
       Type "derive"
       Instance "rate"
       Regex ".*"
       DSType "CounterInc"
       Type "log_hits"
       Instance "count"

Thanks for the clarification -- perhaps I will try to contribute some to 
the documentation effort.

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/20110314/5a36c283/attachment.bin>

More information about the collectd mailing list