responses
Hi,
My system creates binary log file whenever some error happens.
So, I would like to send the binary log file to server(also running the nxlog) when the file is created.
The binary log file is created with specific extension name (for example *.binlog) and I want to send the file to server with same filename.
Can I do this with nxlog?
Thanks.
Harry
Comments (5)
Thank you for the comment.
Is it possible to do something like:
<Input binfile>
Module im_file
File '*.binlog'
Exec exec('script_to_transfer_the_file_and_move_out_of_dir.script', file_name())
</Input>
Thanks in advance.
You will need to add the following to your config file...
Thank you for the reply.
I tried :
<Extension fileop>
Module xm_fileop
</Extension>
# Monitor binary files
<Input binwatchfile>
Module im_file
File 'D:\\logs\\*.png'
<Schedule>
Every 1 sec
First 2010-12-17 00:19:06
Exec log_info("scheduled execution at " + now());
</Schedule>
<OnEOF>
Exec log_info(file_name());
Exec log_info(" Found");
# run script here in future.
Exec file_remove(file_name());
</OnEOF>
</Input>
But it won't start. There's error regarding the 'OnEOF'.
Is 'OnEOF' only supported in Enterprise version?
Thanks.
Hi Harry!
Unfortunately there is no <OnEOF> option in the community version.
Thank you for the reply Manuel,
I think <OnEOF> can solve this problem but sad to hear that community version does not support the option.
I will make script program to do this.
Thank you for the kind reply so far.
Harry.