-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Network Miner generates a network map by sending SNMP requests (LLDP/CDP/EDP).
Do not hesitate to send your issues here.
Prerequisite
-
LLDP, EDP or CDP need to be enabled on your SNMP devices.
-
You need a web server with the php snmp plugin/package enabled.
-
SNMP SysName need to be matching with a DNS record.
Installation
- Clone this repository into your sites location (e.g. /var/www/) :
git clone https://github.com/tux-00/network_miner.git
- Download dependencies :
cd network_miner
bower install
Refer to bower.io for informations about installation.
- Run index.php in your web browser.
The following libs are needed to run Network Miner.
Use bower install
to install dependencies.
Four files are important.
- index.php: base page that will be filled by functions.js with Ajax
- data_mining.php: functions to get data from SNMP devices with CDP/EDP enabled
- functions.js: get events and display the network map
- custom.css: custom css for bootstrap, typeahead and D3.js
You can test Network Miner without the appropriate environment.
To test Network Miner, you need first to copy the content of a json example data file (located in test/data/) to your data directory.
Once the file is copied you need to comment these lines in index.php to avoid the scan and the overwrite of the data on snmp_data.json:
recursive_search($FIRST_DEVICE, 1);
file_put_contents('./data/snmp_data.json', json_encode(array('nodes' => $nodes,
'links' => $links)),
LOCK_EX);
JSON data faker
If you want to submit data for testing purpose you can use the json_data_faker.py Python 2.7 script to fake every device names in your JSON file.
To use this script you need to install faker module with pip install fake-factory
.
Just put the script at your json files location and execute it: python json_data_faker.py
.
The script will scan the current folder, find the json files and replace device names.
Link Layer Discovery Protocol (LLDP):
The Link Layer Discovery Protocol (LLDP) is a vendor-neutral link layer protocol in the Internet Protocol Suite used by network devices for advertising their identity, capabilities, and neighbors on an IEEE 802 local area network, principally wired Ethernet.
Cisco Discovery Protocol (CDP):
The Cisco Discovery Protocol (CDP) is a proprietary Data Link Layer protocol developed by Cisco Systems. It is used to share information about other directly connected Cisco equipment, such as the operating system version and IP address.
Extreme Discovery Protocol (EDP):
EDP is a vendor proprietary protocol from Extreme Networks. It is used to send information like system MAC, device name or VLAN information to neighboring Extreme devices.
JSON data structure:
{
"nodes":[
{
"name":"eswexample",
"group":0
},
{
"name":"eswtest",
"group":0
}
],
"links":[
{
"source":1,
"target":0
},
{
"source":2,
"target":0
}
]
}
- Get SNMP informations from a specific device
- Autorefresh map data
- Save maps as PDF, PNG ...
- Icinga plugin