Tags

, , , , ,

Download Link:
http://nfdump.sourceforge.net/
http://nfsen.sourceforge.net/

nfdump installation:
Install RRDTool and flex (required for nfdump to compile)

# yum install perl-rrdtool rrdtool rrdtool-devel flex

Extract, and compile as follows (your rrdpath may differ, use which rrdtool):

# ./configure —enable-nfprofile —with-rrdpath=/usr/bin
# make
# make install

nfsen installation:
Extract and make a copy of the etc/nfsen-dist.conf and call it nfsen.conf

For CentOS 5.3, with a standard Apache install, the following changes can to be made to the nfsen.conf. Some are optional, but the user, wwwuser and wwwgroup are mandatory.

$BASEDIR = “/usr/local/nfsen”;
$HTMLDIR    = “/var/www/html/nfsen/”;
$USER    = “apache”;
$WWWUSER  = “apache”;
$WWWGROUP = “apache”;

Remove the default sample netflow devices, and add you own. The syntax  is fairly self explanatory: the name of the device, what port it’s  sending flows to, the colour which will represent the device on the web  interface, and the type.

‘COREROUTER’  => { ‘port’    => ‘9996’, ‘col’ => ‘#ff0000’, ‘type’ => ‘netflow’  }, 

Run the install script

# ./install.pl etc/nfsen.conf

The control script is located in /usr/local/nfsen/bin/nfsen.

NfSen will automatically configure and start the necessary nfdump processes. Start the nfsen process

# ./nfsen start

Now you should be able to browse to http://yourserver/nfsen/nfsen.php  and see a bunch of empty graphs, which will hopefully be populated with  many pretty colours over time.

Last thing we can do is set nfsen.php to be the default page for /nfsen in Apache. Create and edit /etc/httpd/conf.d/nfsen.conf

DirectoryIndex nfsen.php