Skip to content

Instantly share code, notes, and snippets.

@jalogisch
Last active December 16, 2015 01:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jalogisch/5353158 to your computer and use it in GitHub Desktop.
Save jalogisch/5353158 to your computer and use it in GitHub Desktop.
nxlog ship gelf via UDP target can be graylog2 or logstash
<Extension gelf>
Module xm_gelf
</Extension>
<Input in>
# Use 'im_mseventlog' for Windows XP and 2003
Module im_msvistalog
Exec if ($EventID == 4202 or $EventID == 4208 or $EventID == 4302 or $EventID == 4304 or $EventID == 5004) drop();\
else{\
if ( $EventType == "INFO" ) $SyslogSeverityValue = 6;\
if ( $EventType == "WARNING" ) $SyslogSeverityValue = 4;\
if ( $EventType == "ERROR" ) $SyslogSeverityValue = 3;\
}
</Input>
<Output out>
Module om_udp
Host 10.10.10.10
Port 12345
OutputType GELF
</Output>
<Route 1>
Path in => out
</Route
@jalogisch
Copy link
Author

Added Additional Drops and Rewrites in the Input ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment