Centreon: NTOP

Centreon: NTOP

Centreon: NTOP 150 150 Roderick Derks

How to install NTOP in Centreon, I started it but couldn’t finish it because of the incompatibility of NTOP module with the newer Centreon versions. Read more:

yum install -y libtool
yum install libpcap libpcap-devel gdbm gdbm-devel -y
yum install rrdtool-devel -y
yum install geoipp geoip-devel -y

./autogen.sh –prefix=/usr/local –with-rrd-home=/usr/bin
make
make install

************************************************************
************************************************************

  WARNING: This install created a directory for the ntop
           files and databases:

             //usr/local/share/ntop

           This directory MUST be owned by the user
           which you are going to use to run ntop.

           The command you must issue is something like:

           chown -R ntop.ntop //usr/local/share/ntop
     or    chown -R ntop:users //usr/local/share/ntop

           man chown to check the syntax for YOUR system

************************************************************
************************************************************

/usr/local/bin/ntop -u ntop -A

chown -R ntop:ntop /usr/local/share/ntop/
chown -R  ntop:ntop /usr/local/var/ntop/
chown -R  ntop:ntop /usr/local/etc/ntop/

Install dot (graphviz) to create traffic maps:

wget http://www.graphviz.org/graphviz-rhel.repo
mv graphviz-rhel.repo /etc/yum.repos.d/
yum list available ‘graphviz*’
yum install ‘graphviz*’
which dot
ln -s /usr/bin/dot /usr/local/bin/dot

ON ANOTHER SERVER cause install subversion comes with a lot of dependencies
yum install subversion
svn co http://svn.modules.centreon.com/centreon-ntop/trunk/www/modules/
cd modules
yum install dos2unix
find . -type f -exec dos2unix {} \;
scp -r ntop root@10.0.2.18:/usr/local/centreon/www/modules/

activate module in Centreon
go to Administration > Options > Options > Ntop
User: admin
Password: nagios
Port: 3000
Installation Path: /usr/local/bin
Service script path: /etc/init.d/ntop

cp /usr/local/centreon/www/modules/ntop/service/ntop /etc/init.d/
chmod +x /etc/init.d/ntop
vi /etc/init.d/ntop

adjust the paths and variables:
userid=’ntop’
http_port=’3000′
logdir=’/var/log’

case “$1” in
start)
# is it the first time we run ntop
[ ! -e /usr/local/var/ntop/ntop_pw.db ] && {
# just in case…
[ ! -d /usr/local/var/ntop ] && {
echo “Reinstalling database directory”
mkdir -p /usr/local/var/ntop
chown -R $userid:$userid /usr/local/var/ntop
}
/usr/local/bin/ntop -u $userid -A || exit 1
echo “Now we can start ntop!”
}
if [ -d $logdir ]; then
touch ${logdir}/ntop.access.log
chown $userid ${logdir}/ntop.access.log
fi
if [ -x /usr/local/bin/ntop ]; then
echo 1
/usr/local/bin/ntop $args  > /dev/null 2>&1
fi

 

visudo

## RRD NTOP BEGIN
## Ntop Restart
CENTREON ALL = NOPASSWD: /etc/init.d/ntop restart *
## Ntop Start
CENTREON ALL = NOPASSWD: /etc/init.d/ntop start *
## Ntop Stop
CENTREON ALL = NOPASSWD: /etc/init.d/ntop stop
## RRD NTOP END

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Your Name (required)

Your Email (required)

Subject

Your Message

Your Name (required)

Your Email (required)

Subject

Your Message