Skip to content

Instantly share code, notes, and snippets.

View narutaro's full-sized avatar
:octocat:
On vacation

narutaro narutaro

:octocat:
On vacation
View GitHub Profile
@narutaro
narutaro / Thrift installation.md
Last active January 28, 2016 06:19
Thrift installation

#Thrift 0.9.3 on ubuntu 14.04

Thrift's official page looks not maitained well. I followed the instruction on the official page but did not work. I hope this page helps a person like me with saving time.

sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev ant

Ubuntu 14.04 gets following errors.

E: Unable to locate package libboost-dev
@narutaro
narutaro / Storage for blog pictures.md
Last active March 3, 2016 05:23
Storage for blog pictures

I tried followings and picked up copy.com.

  • dropbox
  • google drive
  • flickr
  • compy.com
  • amazon cloud drive

Here is why.

@narutaro
narutaro / Select a cloud storage to embed an image in gist.md
Last active December 28, 2015 00:08
Select a cloud storage to embed an image in gist

Dropbox

First Header Second Header
Content Cell Content Cell
Content Cell Content Cell

Google Drive

Flickr

Copy

Amazon cloud drive

It does not work...

@narutaro
narutaro / node.js installation.md
Last active December 12, 2015 21:49
node.js installation
sudo apt-get update && apt-get upgrade
sudo apt-get install nodejs
sudo apt-get install npm

##Version

# nodejs -v
v0.10.25
@narutaro
narutaro / NetFlow real-time analysis with Fluentd.md
Last active July 18, 2019 05:44
NetFlow real-time analysis with Fluentd

#Is NetFlow streaming data analysis possible with fluentd?

I wanted to do some analysis against NetFlow data that I receive everyday. The analyis that I wanna do is various. It is simple pattern matching for a specific IP address, detecting specifc traffic pattern, figuring out network graph and calicurate proximity of certain nodes and so on so forth. I might use norikura plug-in for that purpose later but not sure now.

I know storm, kafuka, spark streaming and even memSQL and VoltDB are good for this purpose but wanted to go with quick way for now.

#Captureing NetFlow with fluentd

I use this NetFlow plug-in on fluentd

@narutaro
narutaro / Best open source NetFlow collector.md
Last active October 23, 2024 14:43
Best open source NetFlow collector

#Open source NetFlow collector ##Over ten years players ###nfsen family - nfpcapd nfsen has very stable and well-accumulated feature set. It provides full-stack of NetFlow feature. NetFlow collector daemon nfpcapd, flow dump file operation tool nfdump and Web front-end nfsen. Community is still avtive.

###ntop-ng family - nprobe

###pmacct family- pmacctd Momory table is something that I want to try.

@narutaro
narutaro / pmacct.md
Last active January 5, 2016 00:44
pmacct

#Preparing a docker container

Use a docker container to setup pmacct. Port 5678/udp for receiving NetFlow.

$ docker run -d -h pmacct --name=pmacct -p 8889:8889 -p 5678:5678/udp -v /home/inoue/docker/pmacct:/pmacct -it ubuntu

Build essentials.

apt-get install build-essential checkinstall
@narutaro
narutaro / mkmf (LoadError).md
Created January 4, 2016 19:46
mkmf (LoadError)

#Symptom

# gem install rest-client
Fetching: unf_ext-0.0.7.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing rest-client:
	ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb
@narutaro
narutaro / tcpreplay.md
Created January 5, 2016 04:58
tcpreplay

Usage

root@tcpreplay:/tcpreplay# tcpreplay -i eth0 -K --mbps 10 smallFlows.pcap 
File Cache is enabled
Actual: 14261 packets (9216531 bytes) sent in 7.03 seconds.
Rated: 1249999.6 Bps, 9.99 Mbps, 1934.15 pps
Flows: 1209 flows, 163.97 fps, 14243 flow packets, 18 non-flow
Statistics for network device: eth0
	Attempted packets:         14261
	Successful packets: 14261
@narutaro
narutaro / flowgen.md
Last active January 22, 2016 22:03
flowgen

The best NetFlow generator flowgen

me@vaio:~/NetFlow-Generator$ time ./flowgen -p 5555 -i 1 --dstaddr 1.1.1.1 -n 1000000 10.40.8.240 
collector = 10.40.8.240
count     = 1000000
spoof     = (none)
port      = 5555
wait      = 0 (msec)
interval = 1