[collectd] how to save data into text file?

Florian Forster octo at verplant.org
Mon Jul 6 16:26:49 CEST 2009


Hi Gian,

On Fri, Jun 19, 2009 at 11:08:34AM +0200, GianLuca Sarto wrote:
> On the same lan, I have a Linux host that could do the job, so here's
> where the serial to ethernet converter comes in.
> 
> I just want to append the string that comes out from the serial
> device, in a text file, on the remote host.

if I understand you correctly, you have a RS242 to ethernet converter.
It provides a TCP port you can connect to and once you've done that, you
receive everything the device provides on the serial interface via that
network socket.

In theory it is possible to write a simple plugin which connects to that
port, listens for incoming data and writes that data to CSV files using
collectd. However:
 a) If all you want to do is write that data to a text file as-is,
    writing a plugin is probably not much less work than writing a
    simple program which achieves that.
 b) From your formulation I guess you want to collect information about
    “events”, i. e. data appears at irregular intervals. collectd
    *requires* data at regular intervals, which would mean that collectd
    is not the right tool for the job. I've been thinking about adding
    an “event” infrastructure, so this type of data can be processes,
    too. Currently, no such interface is available, though.
 
Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- 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/20090706/e009194f/attachment.pgp 


More information about the collectd mailing list