How to use nxLog

2.5k Views Asked by At

How to use nxLog? I installed it on my windows 7 and unix box, but not able to use it.

My Conf File(not sure its correct or not):

define ROOT C:\Program Files\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log

<Extension syslog>
    Module xm_syslog
</Extension>

<Input in>
    Module im_file
    File 'D:\dotnet\Analytics\nxLog\association.log'
    SavePos TRUE
    ReadFromLast TRUE
    PollInterval 1
    Exec $Message = $raw_event; $SyslogFacilityValue = 22;
</Input>

<Output out1>
    Module om_udp
    Host 10.1.1.1
    Port 514
    Exec to_syslog_bsd();
</Output>

<Output out2>
    Module om_udp
    Host 10.1.1.2
    Port 514
    Exec to_syslog_bsd();
</Output>

<Route 1>
    Path in => out1, out2
</Route>

And not sure what to write in host and port.

2

There are 2 best solutions below

0
On

nxlog.log should contain the error messages to help you diagnose the problems.

"And not sure what to write in host and port."

The destination where the udp syslog should be sent to.

0
On

So your host is the destination IP address or hostname (haven't verified hostname functionality) of your destination. AKA where you want to send your logs to. The port is the port. After you update make sure to go to nxlog/data/nxlog.log to check and see if everything started up OK. If it did you should see no error messages at the bottom. I've only done it with TCP and it says that it's trying to establish a connection and then nothing below it. Not sure what you would see with UDP. I also see a message that says "Info nxlog started"

Good luck