1
answer

Hi,
I'm trying to send json log files to a syslog server but it doesn't works. I can see the the tcp connection established with the syslog server but nothing is sent. Seems like the json file is not read. I will appreciate if someone can help me. Below, my nxlog.conf:

define ROOT C:\Program Files (x86)\nxlog
define CERTDIR %ROOT%\cert
define CONFDIR %ROOT%\conf
define LOGDIR %ROOT%\data
define LOGFILE %LOGDIR%\nxlog.log
# LogLevel DEBUG
LogFile %LOGFILE%

Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data

<Extension json>
Module xm_json
</Extension>

#locoal Server
<Input in>
Module im_file
File 'k:\data\json\log\log2019.json*'
Exec parse_json();
</Input>

# To syslog server
<Output out>
Module om_tcp
Host x.x.x.x
Port 514
</Output>

<Route 1>
Path in => out
</Route>

AskedMay 31, 2019 - 4:58pm

Answer (1)

I would verify that the file is being read proper before trying to troubleshoot sending the data.

It would help to add another output, maybe using om_file to see if everything is pulled as you are expecting.

I would also consult the log file to see if anything is printed there.
Verify that your File directive is accurate as well.

AnsweredMay 31, 2019 - 9:08pm