I have set up nxlog for windows 2016 server to send logs to graylog via udp with GELF.
I can clearly see with tcpdump that I am getting messages on port 31338 udp, Graylog is set up to listen to the exact same port for GELF udp. But I get no traffic or messages whatsoever.
I’ve checked the server logs for errors and there aren’t any.
I am using Graylog 3.2.6 on CentOS 7 and NXlog 3.1.2319 on Windows Server 2016
Here is the nxlog config :
Panic Soft
#NoFreeOnExit TRUE
define ROOT C:\Program Files\nxlog
define CERTDIR %ROOT%\cert
define CONFDIR %ROOT%\conf\nxlog.d
define LOGDIR %ROOT%\data
include %CONFDIR%\*.conf
define LOGFILE %LOGDIR%\nxlog.log
LogFile %LOGFILE%
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
# Check the size of our log file hourly, rotate if larger than 5MB
<Schedule>
Every 1 hour
Exec if (file_exists('%LOGFILE%') and \
(file_size('%LOGFILE%') >= 5M)) \
file_cycle('%LOGFILE%', 8);
</Schedule>
# Rotate our log file every week on Sunday at midnight
<Schedule>
When @weekly
Exec if file_exists('%LOGFILE%') file_cycle('%LOGFILE%', 8);
</Schedule>
Module xm_gelf
Module im_msvistalog
Module om_udp
Host 10.3.1.202
Port 31338
OutputType GELF
Path win=>graylog
Here is the iptables setup :
[root@graylog sysconfig]# cat iptables | grep 31338
-A INPUT -p udp -m state --state NEW -m udp --dport 31338 -j ACCEPT
Here is the tcpdump :
[root@graylog sysconfig]# tcpdump -i ens160 udp port 31338 -vvv -X
70 packets captured
70 packets received by filter
[root@graylog sysconfig]# netstat -tulnp | grep 31338
udp 0 0 0.0.0.0:31338 0.0.0.0:* 1476/java
udp 0 0 0.0.0.0:31338 0.0.0.0:* 1476/java
udp 0 0 0.0.0.0:31338 0.0.0.0:* 1476/java
udp 0 0 0.0.0.0:31338 0.0.0.0:* 1476/java
I have no idea why the logs don’t get ingested.
Any input is welcome!