transferring a csv file from one location in my local to another


#1 Sangeetha

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>

#2 Zhengshi Nxlog ✓
#1 Sangeetha
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>

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