Hacked my way through getting Observium to pick up the nfsen RRD so that I see the Netflow tab in the device in Observium.
Here’s what I did…
Install Prerequisite Software
apt-get install gcc flex librrd-dev make librrdp-perl librrds-perl libsocket6-perl libmailtools-perl mrtg rrdtool
Install nfdump
Download nfdump from SourceForge: https://sourceforge.net/projects/nfdump/files/stable/nfdump-1.6.13/
tar zxvf nfdump-1.6.13.tgz cd nfdump-1.6.13/ ./configure --enable-nfprofile --enable-nftrack make && make install
Install nfsen
Download nfsen from SourceForge: https://sourceforge.net/projects/nfsen/files/stable/nfsen-1.3.7/
tar zxvf nfsen-1.3.7.tgz cd nfsen-1.3.7 cp etc/nfsen.conf.dist etc/nfsen.conf
Make configuration changes to nfsen
Modify etc/nfsen.conf
$USER = www-data; $WWWUSER = www-data; $WWWGROUP = www-data; %sources = ( 'routername' => { 'port' => '9996', 'col' => '#0000ff', 'type' => 'netflow', 'IP' => '1.2.3.4' }, ); $MAIL_FROM = 'me@domain.com'; $SMTP_SERVER = 'mail.domain.com';
Save the file and then make a directory where nfsen will store data.
mkdir -p /var/nfsen ./install.pl etc/nfsen.conf
Start nfsen
cd /var/nfsen/bin ./nfsen start
Configure to start nfsen automatically at reboot.
ln -s /var/nfsen/bin/nfsen /etc/init.d/nfsen update-rc.d nfsen defaults 20
Configure Apache2
Configure Apache2 so we can access nfsen while still using observium.
Make a directory to store nfsen HTML files
mkdir -p /var/www/html/nfsen
Edit /etc/apache2/conf-enabled/observium.conf and add the following line before the closing </VirtualHost>.
Alias /nfsen /var/www/html/nfsen
Restart Apache2
service apache2 restart
At this point you should be able to access http://yourip/nfsen/nfsen.php
Cannot create graph
If you see that error, check permissions of /var/nfsen and make sure it is accessible by www-data specified in /var/nfsen/etc/nfsen.conf.
Observium Configuration
Note: The %source in /var/nfsen/etc/nfsen.config must match the host you are using in Observium and it is case sensitive.
So I had a hard time with Observium configuration and decided to just hack it up.
I have Observium installed in /opt/observium, so substitute accordingly.
Add the following to /opt/observium/config.php.
$config['nfsen_enable'] = 1; $config['nfsen_rrds'] = /var/nfsen/profiles-stat/live/; $config['nfsen_split_char'] = ; $config['nfsen_suffix'] = ;