04.06.2010 18:24

How to install and run NeDi on Fedora

NeDi is a fairly good tool for monitoring large networks. It has only one "disadvantage" - it is mainly aimed at networks based on Cisco, HP Procuve, Juniper and many other professional grade switches and routers.

It is not packaged for Fedora and may cause some troubles to install and run. I tried also other monitoring systems like Nagios (mainly for server monitoring) and Zabbix. Zabbix is maybe more complex, but I was not able to get insight into it quickly. Nagios has plugins which is fine, but has too complex configuration, and its SNMP support is rather poor. Therefore I decided to try NeDi even thou I am going to use it for a network based on small linux routers.

NeDis' history is probably quite wild as you can find many site over the net with NeDi sources while beeing marked as Obsolete. At the moment the prime site is http://www.nedi.ch/ which is based on dokuwiki and is quite OK, but almost lacks any usefull documentation and also it is often outdated. You can collect various pieces of info around the net, but it is quite difficult. You can also hardly find a link to nedi forums there.

Therefore I'd like to note here my way of making it work.

NeDi consist of several parts

  1. Perl based NetworkDiscovery script, Monitoring script, Syslog collection script, Trapd script to catch SNMP traps.
  2. PHP based web interface
  3. MySQL database structures

This link was very usefull http://notes.ozmonet.com/NeDi

However I am using SELinux, and I need to be more carefull when installing NeDi.

# Install all packages (separated for accounting purposes)
yum -y install httpd php php-mysql mysql-server php-snmp php-gd
yum -y install perl-Net-Telnet-Cisco perl-Algorithm-Diff \
perl-Net-Telnet perl-Net-SNMP net-snmp rrdtool

# Restart up services
service httpd restart
service mysqld restart

# Download and install NeDi
wget http://www.nedi.ch/_media/files:nedi-1.0.5.tgz
tar -xzvf nedi-1.0.5.tgz
mv nedi /usr/local/nedi
useradd -l nedi -g apache -s /bin/bash -d /usr/local/nedi/
mkdir /usr/local/nedi/log
mv /usr/local/nedi/html /var/www/html/nedi
mv /usr/local/nedi/nedi.conf /var/www/html/nedi/
ln -s /var/www/html/nedi/nedi.conf /usr/local/nedi/nedi.conf
ln -s /var/www/html/nedi /usr/local/nedi/html
chown nedi:apache –R /usr/local/nedi
chgrp nedi:apache –R /var/www/html/nedi

# Edit nedi.conf with your settings
vi nedi.conf
# set at least mailfrom, smtpserver,nedipath,rrdstep

vi /var/www/html/nedi/inc/libmisc.php
# Right at the begining change the path 
# php searches for nedi.conf, change it to look like this
#  if (file_exists('/var/www/html/nedi/nedi.conf')) {
#    $conf = file('/var/www/html/nedi/nedi.conf');

#Now you need to setup MySQL 
#(NeDi compared to zabbix has a quick script for it!)
#setup mysql root account
/usr/bin/mysqladmin -u root -h hostname password 'Yourpassword'
cd /usr/local/nedi/
./nedi.pl -i

# Set NeDi to run every half-hour
su nedi -
crontab –e

0 0 * * * /usr/local/nedi/nedi.pl -b > /usr/local/nedi/log/nedi-backup.lastrun 2>&1
30 0 * * * /usr/local/nedi/nedi.pl > /usr/local/nedi/log/nedi.lastrun 2>&1
*/30 1-23 * * * /usr/local/nedi/nedi.pl > /usr/local/nedi/log/nedi.lastrun 2>&1

#Head your browser to http://hostname/nedi/
#Login with Admin/Admin

Now you may or may not have NeDi running (depends on wherether I forgot some setup steps as I am writing them down after I made it thru all the stuff till the end).

One more sympatic thing on NeDi is it has a console output. You can run ./nedi.pl -h to view the options, then you can start nedi to seed and discover your network.

If your network is not having CDP (cisco discovery protocol) or LLDP (some other discovery), you'll have almost nothing in the lists, except you gateway. To make NeDi usefull in your network of linux routers you need setup at least two things

seedlist - populate it with all the router IPs you have

All your linux routers will be identified as IOLAN, it is probably some kind of fallback device. You can find its definition under


I made same small modifications to it to at least give some info for Linux routers:

Serial  .
Bimage  .
CPUutl  .
MemCPU  .

Again this may or may not be suitable for your network. If you would like to know what those values are use

snmptranslate  .
snmpwalk -v 1 -c public router_hosname .

To see a comlete list of your linux based snmp output you can walk a complete list

snmpwalk -v 1 -c public router
snmpwalk -v 2c -c public router
snmpwalk -v 2c -c public router enterprise

# To find a numbered representation for interesting value 
snmptranslate -Td HOST-RESOURCES-MIB::hrDeviceDescr.768

While NeDi is very helpfull to find and display vairous stuff about your network, there is still a space for you to add some value. Mainly under Topology Links and Map. While adding links is mostly clear to me, I did not discovered yet the magic of creating map.

To get at least basic location info and capability to send email with warnings you have to setup /etc/snmp/snmpd.local.conf with two values:

syslocation RouterLocation
syscontact Admins 

NeDi is capable of visualizing your network automatically. In order to do that, NeDi needs a certain format in the SNMP location string (separator can be set in nedi.conf with locsep):

Region;City;Building;Floor;[Room;][Place within room;][Whatever additional info you want]

Do not forget to restart your snmpd for changes to take effect.

Also check this link about NeDi installation on MAC. It is for older version and for MAC, but you can find there pictures and some useful info.

Some NeDi terminlogy:

Device: Router, Switch
Node: End user stations
Modules: Modular parts in Devices
Interfaces: Well ... interfaces
Vlans: VLANs identified by name for a specific device family (base on def file, hardly usable for linux)
Wlans: Cisco etc. specific wireless interfaces
Incidents: SNMP trap events (need addition specific SNMP configuration)

Email comment