Nfdump是linux下netflow数据采集分析工具,Nfsen是基于nfdump是web界面工具,服务器需先安装web服务器和php环境。
安装rrdtool及所需组件:
yum install perl-rrdtool rrdtool rrdtool-devel rrdutils flex byacc
安装所需perl模块:
yum install perl-Socket6 perl-MailTools perl-Mail-Sender
安装Nfdump工具:
cd /usr/local/src/
wget http://downloads.sourceforge.net/project/nfdump/stable/nfdump-1.6.6/nfdump-1.6.6.tar.gz
tar zxvf nfdump-1.6.6.tar.gz
cd nfdump-1.6.6/
./configure --enable-nfprofile --with-rrdpath=/usr/bin
make
make install
cd ../
下载配置Nfsen:
mkdir -p /usr/local/nfsen
wget http://downloads.sourceforge.net/project/nfsen/stable/nfsen-1.3.6p1/nfsen-1.3.6p1.tar.gz
tar zxvf nfsen-1.3.6p1.tar.gz
cd nfsen-1.3.6p1/
cp etc/nfsen-dist.conf etc/nfsen.conf
修改Nfsen配置文件:
cat etc/nfsen.conf
#https://www.haiyun.me
$BASEDIR = "/usr/local/nfsen";
$HTMLDIR = "/var/www/html/nfsen/";
$USER = "apache";
$WWWUSER = "apache";
$WWWGROUP = "apache";
%sources = (
'upstream1' => { 'port' => '9995', 'col' => '#0000ff', 'type' => 'netflow' },
);
安装Nfsen:
./install.pl etc/nfsen.conf
启动Nfsen:
/usr/local/nfsen/bin/nfsen start
配置路由或交换机将netflow数据发送到nfsen配置的端口,然后访问www.haiyun.me/nfsen/nfsen.php即可通过Nfsen浏览netflow数据。
标签:centos, perl, netflow, 流量分析, nfdump, nfsen, linux下构建netflow流量分析环境, centos安装nfdump和nfsen, rrdtool
您好~
我想請問我OS是Fedora6,依您的教程裝完Nfdump與Nfsen後,在產生圖片時卻會在Home發生"No data available!"的情形,以及Details會顯示"Error Creating Graph!",這種情形是為什麼呢?
我有用chmod 777 改過/usr/local/nfsen 跟 /var/www/html/nfsen/了,還是依然無解...
请查看日志nfsen是否正常启动,监听商品是否正常,防火墙是否阻止,Tcpudmp监听能否收到netflows数据。
centos6.0安装nfsen出现
Can't locate RRDs.pm in @INC (@INC contains: ./libexec ./installer-items /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at libexec/NfSenRRD.pm line 38.
BEGIN failed--compilation aborted at libexec/NfSenRRD.pm line 38.
Compilation failed in require at libexec/NfSen.pm line 43.
BEGIN failed--compilation aborted at libexec/NfSen.pm line 43.
Compilation failed in require at ./install.pl line 46.
BEGIN failed--compilation aborted at ./install.pl line 46.
请解决
@随遇而安
请确认有安装rrdtool,编译安装rrdtool的将rrdtool/lib/perl/*/i386-linux-thread-multi/RRDs.pm软链接到/usr/lib/perl5/*/i386-linux-thread-multi/
Frontend - Backend version missmatch!
ERROR: nfsend connect() error: Permission denied!
ERROR: nfsend - connection failed!!
ERROR: Can not initialize globals!
我也遇到了你的问题,不知道,你是怎么解决的。
Frontend - Backend version missmatch!
ERROR: nfsend connect() error: Permission denied!
ERROR: nfsend - connection failed!!
ERROR: Can not initialize globals!
我也遇到这个问题
很多前之前写的了,系统/软件都有变化。
Are there any other security restrictions in place, SElinux, php modules
etc.
which prevent the socket open.