August 8, 2011


Ubuntu or Debian (the easy way)

  1. Deploy a minimal Ubuntu or Debian machine with SSH server
  2. Run this script as root
  3. Browse to https://your-ubuntu-machine and login with admin/admin
  4. Download the NeDi Guide and read on



Using apache for example:

sudo apt-get install apache2 libapache2-mod-php mysql-server libnet-snmp-perl libcrypt-rijndael-perl libcrypt-hcesha-perl libcrypt-des-perl libdigest-hmac-perl libio-pty-perl libnet-telnet-perl libalgorithm-diff-perl librrds-perl php-mysql php-snmp php-gd rrdtool libsocket6-perl

Optional (read below for details): libweb-simple-perl libnet-ntp-perl libnet-dns-perl

Then perform the following steps:

  1. create a /nedi folder somewhere (preferable in /var) and extract the tarball. Change permission to www-data
  2. In /etc edit apache2/sites-enabled/000-default.conf and adjust document root to /var/nedi/html
  3. edit apache2/apache2.conf and change /var/www to /var/nedi/html as well
  4. Optionally adjust php5/apache2/php.ini to increase max upload and post size
  5. run nedi -i and you should be able to login with admin/admin
  6. For security reasons, you should at least limit access to SSL and prohibit showing directory indexes…


With postgres backend for example:

yum -y install perl-Net-Telnet perl-Socket6 perl-Algorithm-Diff perl-Net-Telnet perl-Net-SNMP net-snmp rrdtool perl-RRD-Simple.noarch perl-Time-HiRes-Value.noarch perl-Class-DBI-Pg.noarch perl-DBD-Pg perl-IO-Pty-Easy.noarch perl-libwww-perl.noarch postgresql php-pgsql php-process

Some faithful community members did a great job in documenting their installations with a lot more details:

Generic Installation Procedure

  1. Satisfy the dependencies listed below.
  2. Extract the NeDi archive (e.g. to /var/nedi). Move the files in html to your webserver’s document root (e.g. /var/www/htdocs) or adjust the document root.
  3. Edit nedi.conf to fit your needs (Please use the new one as copying your existing config may lead to errors, if new items are missing). If you get ‘Dude, where is nedi.conf?’ link it to /etc.
  4. Cd to /var/nedi (or whatever you chose) and type ./ -i to initialize the backend. Starting with NeDi 1.4, you can use -i nodrop for updating an existing DB structure without the need for DB admin credentials. Alternatively -i updatedb will do just that without any loss of data.
  5. The monitoring daemon can be started from commandline, startup script or the GUI.
  6. Since requires a priviledged port (514) a simple workaround (to avoid running it as root) would be to forward a high port via system’s FW. This means something like this for Linux: iptables -A PREROUTING -t nat -p udp –dport 514 -j REDIRECT –to-port 1514. Just set $port in to 1514 (or whatever you chose the port to be). Now you can even restart it from the GUI with System-Services.
  7. A similar setup can be implemented for snmptrapd: iptables -A PREROUTING -t nat -p udp –dport 162 -j REDIRECT –to-port 1162.

Head over to the Documentation pages once you’re done here…

Hardware Requirements

The computer requirements depend on the size of your network (surprised?). A single 2GHz core and 1GB Ram will do fine for networks with 500 devices and 10’000 nodes. You may consider increasing this for larger networks…

The NeDi script itself uses up to 150MB of RAM on a discovery run. If you want to include Tobi’s RRDtool, you’ll need ~200KB disk storage per interface (can be adjusted with rrdsize in nedi.conf).

Software Requirements

The discovery part is programmed in Perl and needs those additional modules:

  • Net::SNMP
  • Net::Telnet
  • Algorithm::Diff
  • DBI
  • DBD::MySQL
  • RRDs
  • Socket6
  • LWP::UserAgent (optional HTTP service monitoring and getting info from Cisco phones)
  • Net::DNS::Resolver (optional DNS service monitoring)
  • Net::NTP (optional NTP service monitoring, e.g monitor actual stratum)
  • IO::Tty (optional SSH support)
  • libnet (provides Net::SMTP for alerts)

The frontend requires a webserver providing PHP with the following addons:

  • SQL
  • SNMP
  • GD (for Topology-Map)
  • MCRYPT for SHA256 password encryption