######################################## # Global directives # ######################################## #User nxlog #Group nxlog LogFile /var/log/nxlog/nxlog.log LogLevel INFO ######################################## # Modules # ######################################## Module xm_syslog Module xm_json Module im_file File "/var/log/apache2/access.log" if $raw_event =~ /(?x)^(\S+)\ \S+\ (\S+)\ \[([^\]]+)\]\ \"(\S+)\ (.+) \ HTTP\/\d\.\d\"\ (\S+)\ (\S+)\ \"([^\"]+)\" \ \"([^\"]+)\"/ { $Hostname = $1; if $2 != '-' $AccountName = $2; $EventTime = parsedate($3); $HTTPMethod = $4; $HTTPURL = $5; $HTTPResponseStatus = $6; if $7 != '-' $FileSize = $7; if $8 != '-' $HTTPReferer = $8; if $9 != '-' $HTTPUserAgent = $9; } Module om_udp Host 192.168.56.105 PORT 514 if ($Hostname == '127.0.0.1') drop(); to_json(); ######################################## # Routes # ######################################## Path apache_access => syslog_udp