Introduction
This project provides a Netty based solution for receiving syslog messages. The following formats are currently supported. The mechanism for parsing log messages is plugable. You can add support for additional formats by implementing a MessageParser for the format you wish to support.
- RFC 3164 - The BSD Syslog Protocol
- RFC 5424 - The Syslog Protocol
- CEF - ArcSight Common Event Format
Setting up a listener
UDP
Bootstrap b = new Bootstrap();
b.group(workerGroup)
.channel(NioDatagramChannel.class)
.handler(new ChannelInitializer<DatagramChannel>() {
@Override
protected void initChannel(DatagramChannel datagramChannel) throws Exception {
ChannelPipeline channelPipeline = datagramChannel.pipeline();
channelPipeline.addLast(
new UDPSyslogMessageDecoder(),
new SyslogMessageHandler(),
handler
);
}
});
return b.bind(InetAddress.getLoopbackAddress(), port());
Building
mvn clean install