nxlog
Posted: Fri Apr 15, 2016 4:38 am
Hello,
I am new to Nagios Log server and i am trying to send logs from Windows to Nagios Log Server.
I managed to do so from other network devices, but couldn't from any windows PC.
my nxlog.conf is:
===============================================================================
define ROOT C:\Program Files (x86)\nxlog
define CERT %ROOT%\cert
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
<Extension json>
Module xm_json
</Extension>
<Extension syslog>
Module xm_syslog
</Extension>
<Input internal>
Module im_internal
</Input>
# Watch your own files
<Input file1>
Module im_file
File '%ROOT%\data\nxlog.log'
SavePos TRUE
Exec $Message = $raw_event;
</Input>
# Windows Event Log
<Input eventlog>
# Uncomment im_msvistalog for Windows Vista/2008 and later
Module im_msvistalog
</Input>
<Output out>
Module om_tcp
Host 172.22.1.40
Port 3515
Exec $tmpmessage = $Message; delete($Message); rename_field("tmpmessage","message");
Exec $raw_event = to_json();
# Uncomment for debug output
# Exec file_write('%ROOT%\data\nxlog_output.log', $raw_event + "\n");
</Output>
<Route 1>
Path internal, file1, eventlog => out
</Route>
================================================================================
The only type of logs that i receive at dashboard is like these:
2016-04-15T09:26:32.582+03:00 172.22.1.136 eventlog 2016-04-15 09:23:19 ERROR couldn't connect to tcp socket on 172.22.1.40:3515; No connection could be made because the target machine actively refused it.
2016-04-15T09:26:32.582+03:00 172.22.1.136 eventlog 2016-04-15 09:26:39 INFO connecting to 172.22.1.40:3515
2016-04-15T09:26:32.581+03:00 172.22.1.136 eventlog 2016-04-15 09:23:18 INFO connecting to 172.22.1.40:3515
2016-04-15T09:26:32.581+03:00 172.22.1.136 eventlog 2016-04-15 09:23:19 INFO reconnecting in 200 seconds
2016-04-15T09:26:32.570+03:00 172.22.1.136 eventlog 2016-04-15 09:19:58 INFO reconnecting in 200 seconds
2016-04-15T09:26:32.570+03:00 172.22.1.136 eventlog 2016-04-15 09:19:58 ERROR couldn't connect to tcp socket on 172.22.1.40:3515; A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because c...
2016-04-15T09:26:32.569+03:00 172.22.1.136 eventlog 2016-04-15 09:19:37 INFO connecting to 172.22.1.40:3515
================================================================================
Please propose a solution.
Regards,
John
I am new to Nagios Log server and i am trying to send logs from Windows to Nagios Log Server.
I managed to do so from other network devices, but couldn't from any windows PC.
my nxlog.conf is:
===============================================================================
define ROOT C:\Program Files (x86)\nxlog
define CERT %ROOT%\cert
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
<Extension json>
Module xm_json
</Extension>
<Extension syslog>
Module xm_syslog
</Extension>
<Input internal>
Module im_internal
</Input>
# Watch your own files
<Input file1>
Module im_file
File '%ROOT%\data\nxlog.log'
SavePos TRUE
Exec $Message = $raw_event;
</Input>
# Windows Event Log
<Input eventlog>
# Uncomment im_msvistalog for Windows Vista/2008 and later
Module im_msvistalog
</Input>
<Output out>
Module om_tcp
Host 172.22.1.40
Port 3515
Exec $tmpmessage = $Message; delete($Message); rename_field("tmpmessage","message");
Exec $raw_event = to_json();
# Uncomment for debug output
# Exec file_write('%ROOT%\data\nxlog_output.log', $raw_event + "\n");
</Output>
<Route 1>
Path internal, file1, eventlog => out
</Route>
================================================================================
The only type of logs that i receive at dashboard is like these:
2016-04-15T09:26:32.582+03:00 172.22.1.136 eventlog 2016-04-15 09:23:19 ERROR couldn't connect to tcp socket on 172.22.1.40:3515; No connection could be made because the target machine actively refused it.
2016-04-15T09:26:32.582+03:00 172.22.1.136 eventlog 2016-04-15 09:26:39 INFO connecting to 172.22.1.40:3515
2016-04-15T09:26:32.581+03:00 172.22.1.136 eventlog 2016-04-15 09:23:18 INFO connecting to 172.22.1.40:3515
2016-04-15T09:26:32.581+03:00 172.22.1.136 eventlog 2016-04-15 09:23:19 INFO reconnecting in 200 seconds
2016-04-15T09:26:32.570+03:00 172.22.1.136 eventlog 2016-04-15 09:19:58 INFO reconnecting in 200 seconds
2016-04-15T09:26:32.570+03:00 172.22.1.136 eventlog 2016-04-15 09:19:58 ERROR couldn't connect to tcp socket on 172.22.1.40:3515; A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because c...
2016-04-15T09:26:32.569+03:00 172.22.1.136 eventlog 2016-04-15 09:19:37 INFO connecting to 172.22.1.40:3515
================================================================================
Please propose a solution.
Regards,
John