[collectd] Collecting stats from a tab delimited file
Marc Fournier
marc.fournier at camptocamp.com
Tue Mar 1 09:31:48 CET 2016
CJ Ess <zxcvbn4038 at gmail.com> writes:
> I'm looking to start collecting data from a log file with tab
> delimited fields. Sometimes I just need to capture the nth field, in
> some cases I need to sum several fields before passing them to
> collectd. It doesn't appear that I can do either thing with the Tail
> plug-in. Before I go and write something to do this, I'm wondering if
> anyone knows of something similar?
The tail_csv plugin does that, but unfortunately it has the comma
character as the separator hardcoded. Modifying the plugin to use tab
should be pretty straightforward though. Bonus points for making this
character configurable and sharing the patch ;-)
For summing fields, assuming you base on tail_csv for metrics
collection, you can imagine using the aggregation plugin.
HTH,
Marc
More information about the collectd
mailing list