Basic question about NXLOG file transfert configuration

Tags:

#1 sophie

Hi all,

I am new with NXLOG and I have a very basic question to ask you : is it possible to simply copy a file from server A (source file name : c:\osit\log\df_mon.log) to server B (target file name : c:\osit\log15\df_mon.log). I spent already hours on NXLOG config file but I was not able to make it worked because the instruction "File" seeems not to be compatible wit the "om_tcp" output modeule and Host/Port settings.

Thanks a lot in advance, Sophie

#2 adm Nxlog ✓
#1 sophie
Hi all, I am new with NXLOG and I have a very basic question to ask you : is it possible to simply copy a file from server A (source file name : c:\osit\log\df_mon.log) to server B (target file name : c:\osit\log15\df_mon.log). I spent already hours on NXLOG config file but I was not able to make it worked because the instruction "File" seeems not to be compatible wit the "om_tcp" output modeule and Host/Port settings. Thanks a lot in advance, Sophie

It is possible to set up NXLog so that it collects logs from files , transfers it over the network and stores the data in the same structure. The following (untested) configs would do that.




############ Client conf #################
<Extension fileop>
Module xm_fileop
</Extension>

<Input test_data>
Module im_file
File '/logs/*.log'
Exec $Filename = file_basename(file_name());
</Input>

<Output out>
Module om_tcp
Host 10.1.2.3
Port 1515
OutputType Binary
</Output>

<Route client>
Path in => out
</Route>




############ Server conf #################

<Input in>
Module im_tcp
Host 0.0.0.0
Port 1514
InputType Binary
</Input>

<Output out>
Module om_file
File '/path/to/logs/' + $Filename
</Output>

<Route server>
Path in => out
</Route>