Hi Botond,
First of all, thanks for your inputs.
I could not understand the client side.
Which file has the events? Don't I tell it a File directive?
Actually what I need is read (on client side) text log files with log
messages (auth.log, syslog, etc) and send them to a server through TCP.
When these messages arrive on receiver side, create flat files with the
same messages, and if possible with same file names (auth.log, syslog,
etc). Afterward I'll examine (with other programs than nxlog) the files on
the receiver machine.
Thanks
Ricardo
On Sat, Dec 7, 2013 at 10:21 AM, Botond Botyanszki <b...@nxlog.org> wrote:
> Hi,
>
> On Sat, 7 Dec 2013 09:44:08 -0200
> Ricardo Brandão <rbrandao...@gmail.com> wrote:
>
> > I had the hope I could do:
> >
> > <Output fileout1>
> > Module om_file
> > file "/var/log/nxlog/"
> > </Output>
> >
> > Just this... And all file that nxlog receives put automatically on
> > /var/log/nxlog/ directory.
>
> You can do this, but this must be explicitly configured. NXLog does not
> send files. It sends events, where events come from a log source (=Input
> module), and file is only one such event source.
>
> Here is what you need to do:
> * client side:
> <Input f>
> Module im_file
> Exec $Message = raw_event; $FileName = f->file_name();
> </Input>
>
> * server side:
>
> <Output fileout1>
> Module om_file
> Exec $raw_event = $Message;
> File "/var/log/" + file_basename($FileName)
> # This will preserve the original path but this is dangerous:
> # File $FileName
> </Output>
>
> Note that to transmit fields you must send in a structured format such as
> JSON or NXLog's Binary format, otherwise $FileName and $Message will not
> be sent by the client.
>
> Probably this partially answers Larry's question as well.
>
>
> Regards,
> Botond
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
>
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> nxlog-ce-users mailing list
> nxlog-ce-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users
>
--
Ricardo Brandão
http://www.programonauta.com.br
........__@
....._ \ >_
....(_) / (_)
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users