Development

This is a work in progress to document NeDi's inner workings. It will hopefully soon provide enough information to easily integrate contributions and the likes…

Introduction

NeDi persists of a series of perl scripts (some main programs and shared libraries) on the discovery part and a similar constellation of PHP scripts on the GUI side. In addition it reads or writes a series of text files:

Overall file dependency

Discovery/Backend

Structure

Backend dependencies

Main Files

moni.plDaemonPolls uptimes. Saves states in monitoring table and notifies as configured.
nedi.plCronjobActual discovery
syslog.plDaemonListens on prort 514 for syslog messages stores them and notifies as configured.
trap.plsnmptrapd handlerStores traps in the messages table. No further development in favour of syslog.pl

Includes

Each function now contains a header describing the expected arguments, which globabl variables are being modified and what it returns.

libcli-netssh.plCLI functions based on Net::Telnet(::Cisco only required for cat1900 support on –more– prompt, which will be dropped after NeDi 1.0!) and Net::SSH.
libdb-msq.plDB backend and query generation for MySQL. Could be rewritten for any other way to store and retreive data.
libmon.plNotifications
libsnmp.plSNMP and .def file handling
libweb.plFetch info through Web interfaces of devices (basically phones).
libmisc.plAll other stuff!
oui.txtMAC address vendors
iab.txtMAC address sub-vendors
wlan.txt1st 4 bytes of AP MAC addresses collected across Switzerland. This list will be used in Reports-Wlan.

GUI/Frontend

Structure

GUI Structure

Main Files

If you wish to create you own module, have a look at Topology-Table.php to get the idea of how mine are built. Devices-Modules.php is the simplest one to reveal list based functions like SQL query generation and handling or how the actual table and column headers are created.

Includes

Devsend.plHelper script for using libcli-netssh.pl in Devices-Write.php.
browsedev.phpPopup for selecting device icon in Other-Defgen.php
drawrrd.phpReturns an RRD graph in PNG format.
footer.phpJust a simple footer
graph.phpOnly added for Other-Plot.php, when I was experimenting.
header.phpGroup assignment and according Menu generation. Theme, Language and html processing.
libdev.phpDevice related functions
libgraph.phpRRD graphing
libmon.phpMonitoring Frontend
libmsq.phpDB functions that go with libdb-msq.pl
libnod.phpNode related code
libmisc.phpAll other functions
snmpget.phpsnmpget GUI for Other-Defgen.php
snmpwalk.phpsnmpwalk GUI for Other-Defgen.php
cal.jsPopup calendar for certain List based modules
JSCookMenu.jsThis and the ThemeN folder belong to the menu system.
alarmX.mp3Genuine PSI alarms (they where only testing!)
enter2.mp3A (warning) sound I've created
Recent changes RSS feed NeDi Powered ;-) Driven by DokuWiki