Skip to content

Instantly share code, notes, and snippets.

@zubietaroberto
Last active August 29, 2015 14:08
Show Gist options
  • Save zubietaroberto/dc0f5e0687f651c75b33 to your computer and use it in GitHub Desktop.
Save zubietaroberto/dc0f5e0687f651c75b33 to your computer and use it in GitHub Desktop.
Simple Netflow V9 Collector, based on Sghazzawi's Node-Netflowd library. To run in NodeJS just execute "npm install" and then "node main.js"
//Copy-Pasted from https://github.com/Sghazzawi/Node-Netflowd
var Collector=require("Netflow");
var x = new Collector(function (err) {
if(err != null) {
console.log("ERROR ERROR \n"+err);
}
})
.on("listening",function() { console.log("listening"); } )
.on("packet",function(packet) { console.log(packet); } )
.listen(8080);
{
"name": "nodetest",
"version": "0.0.0",
"private": true,
"dependencies": {
"public": "git://github.com/Sghazzawi/Node-Netflowd.git"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment