How To Execute Modification File
I hava some data like this
--------------------------
a 9650 mktd 07:30 [OK ] a
b 9650 mktd 07:30 [OK ] b
c 9650 mktd 07:30 [OK ] c
d 9650 mktd 07:30 [OK ] d
if data have change to this
a 9650 mktd 07:30 [OK ] a
b 9650 mktd 07:30 [OK ] b
c 0 [FAILED] c
d 0 [FAILED] d
how could I reload the file to nxlog
I have been to tried to use PollInterval ,but it seem to use for new file and new log entries
I also try to use file_touch,but both of them doesn't useful for me.
my scripts below
#define ROOT C:\Program Files\nxlog
define ROOT C:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
<Extension json>
Module xm_json
</Extension>
<Extension fileop>
Module xm_fileop
</Extension>
<Extension exec>
Module xm_exec
</Extension>
<Extension kvp>
Module xm_kvp
KVPDelimiter ,
KVDelimiter =
EscapeChar \\
</Extension>
<Input test>
Module im_file
File 'D:\winapp\log\chk2.txt'
SavePos FALSE
ReadFromLast FALSE
</Input>
<Processor pro>
Module pm_null
Exec delete($SourceModuleName); \
delete($SourceModuleType); \
delete($EventReceivedTime);
<Exec>
if ($raw_event =~ /^(\w+)\s+(\d+)(.*)/)
{
$app_name = $1;
$pid = integer($2);
$msg = $3;
to_json();
}
else
{
drop();
}
if ($pid == 0)
{
if($msg =~ / \s+\[(\w+)\] (.*)/)
{
$status = $1;
$event_time = integer(now())/1000;
delete($msg);
to_json();
}
}
if($pid != 0)
{
if($msg =~ / (\w+)\s+(\d\d:\d\d)\s+\[(\w+)\s+\] (.*)/)
{
$account = $1;
$start_time = $2;
$status = $3;
$event_time = integer(now())/1000;
delete($msg);
to_json();
}
}
</Exec>
</Processor>
<Output out>
Module om_file
File 'D:\winapp\log\pchk_test.txt'
</Output>
<Route 1>
Path test => pro => out
</Route>
Thank you for help