0
answers

Hi,
I'm trying to parse a csv log file from my local and store it again in another location in my local. But I see it is not happening.
The config has no errors. the destination file is same as source file with respect to file properties.
Can you tell whether any specific check should be done?

<Extension csv_parser1>
Module xm_csv
Fields date-time,client-ip,client-hostname,server-ip,server-hostname,\
source-context,connector-id,source,event-id,internal-message-id,message-id,recipient-address,\
recipient-status,total-bytes,recipient-count,related-recipient-address,reference,message-subject,\
sender-address,return-path,message-info,directionality,tenant-id,\
original-client-ip,original-server-ip,custom-data
Delimiter ,
</Extension>

# Message Tracking log as input
<Input messagetracking>
Module im_file
File '%BASEDIR%file.log'
<Exec>
if $raw_event =~ /^(\xEF\xBB\xBF)?(date-time,|#)/ drop();
else
{
csv_parser1->parse_csv();
$EventTime = parsedate(${date-time});
}
</Exec>
</Input>

<Output msg>
Module om_file
File 'location\msg.log'
</Output>

<Route 1>
Path messagetracking => msg
</Route>

AskedApril 11, 2019 - 3:29pm

Comments (2)

  • Zhengshi's picture
    (NXLog)

    No errors in nxlog.log file?
    The location you are using is a relative path, make sure to look where you are running NXLog from. I would suggest change that to an absolute path.
    Add some log_info($raw_event) procedures to watch your events come through as well.
    I find while troubleshooting it is nice to run NXLog in foreground mode. nxlog.exe -f

    April 12, 2019 - 11:59pm
  • Sangeetha's picture

    Thanks for ur input. It has been resolved by adding "ReadFromLast False"

    April 17, 2019 - 4:02pm

Answers (0)