CSV file sending to syslog server
Can everyone share what script for my testing, what I want to happen is I have a CSV file and I want to send it to my Syslog server?.
This is my config.
Panic Soft
#NoFreeOnExit TRUE
define ROOT C:\Program Files (x86)\nxlog
define CERTDIR %ROOT%\cert
define CONFDIR %ROOT%\conf
define LOGDIR %ROOT%\data
define LOGFILE %LOGDIR%\nxlog.log
LogFile %LOGFILE%
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
########################################
# Modules #
########################################
<Extension csv>
Module xm_csv
Fields $LogFilename, $RowNumber, $date, $time, $c-ip, $cs-username, $cs-username, %s-ip, $s-port, $cs-method, $cs-uri-stem, $sc-status, $sc-win32-status, $sc-substatus, $x-session, $x-fullpath
Delimiter ,
</Extension>
<Extension _syslog>
Module xm_syslog
</Extension>
<Input in>
Module im_file
File 'C:/Users/Administrator/Desktop/Test/*.csv'
ReadFromLast FALSE
SavePos FALSE
<Exec>
csv->parse_csv();
to_syslog_ietf();
$EventTime = strptime($Date + " " + $Time, "%m/%d/%Y %H:%M:%S");
</Exec>
</Input>
<Output out>
Module om_udp
Host 192.168.2.192
Port 514
#Exec to_syslog_bsd();
Exec to_syslog_ietf();
</Output>
########################################
# Routes #
########################################
<Route 1>
Path in =>out
</Route>
This is the error that appears. What am I missing here in the script ?.
2021-07-25 19:00:48 WARNING stopping nxlog service
2021-07-25 19:00:49 WARNING nxlog-ce received a termination request signal, exiting...
2021-07-25 19:00:53 INFO nxlog-ce-2.11.2190 started
2021-07-25 19:00:53 WARNING Module in has no input files to read
Hello,
I believe you may want to start with getting some info about how NXLog handles delimiter separated values, and learn about syslog options present in the NXLog Community Edition.
It might be also good idea to browse topics on this forum - there's lots of knowledge here.
Good luck!
Raf