https://github.com/jcustenborder/netty-codec-netflow
Netty decoder for Netflow V9
https://github.com/jcustenborder/netty-codec-netflow
decoder netflow netflow-v9 netty
Last synced: about 2 months ago
JSON representation
Netty decoder for Netflow V9
- Host: GitHub
- URL: https://github.com/jcustenborder/netty-codec-netflow
- Owner: jcustenborder
- License: apache-2.0
- Created: 2017-01-18T18:25:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-15T16:36:11.000Z (over 8 years ago)
- Last Synced: 2025-03-30T20:34:15.954Z (3 months ago)
- Topics: decoder, netflow, netflow-v9, netty
- Language: Java
- Size: 19.5 KB
- Stars: 5
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Introduction
This project provides support for receiving [NetFlow](https://en.wikipedia.org/wiki/NetFlow) data from network devices
using [Netty](http://netty.io). Currently only [NetFlow v9](https://en.wikipedia.org/wiki/NetFlow#NetFlow_and_IPFIX) is supported. There are plans to
support [NetFlow v5](https://en.wikipedia.org/wiki/NetFlow#NetFlow_Versions) in a future release.## Usage
### Pipeline Configuration
```java
Bootstrap b = new Bootstrap();
b.group(bossGroup)
.channel(NioDatagramChannel.class)
.handler(new ChannelInitializer() {
@Override
protected void initChannel(DatagramChannel datagramChannel) throws Exception {
ChannelPipeline channelPipeline = datagramChannel.pipeline();
channelPipeline.addLast(
new LoggingHandler("NetFlow", LogLevel.TRACE),
new NetFlowV9Decoder(),
new NetFlowV9RequestHandler()
);
}
});
```### NetFlow Message Processing
```java
class NetFlowV9RequestHandler extends SimpleChannelInboundHandler {
@Override
protected void channelRead0(ChannelHandlerContext channelHandlerContext, NetFlowV9Decoder.NetFlowMessage netFlowMessage) throws Exception {}
}
```