Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

90 lines
2.4 KiB
Markdown
Raw Permalink Normal View History

2017-10-26 15:34:36 -05:00
# Network Map
2017-10-02 21:36:22 +01:00
LibreNMS has the ability to show you a network map based on:
2015-07-18 16:15:57 +01:00
- xDP Discovery
- MAC addresses
2019-09-09 05:48:35 -05:00
By default, both are are included but you can enable / disable either
one using the following config option:
2015-07-18 16:15:57 +01:00
```php
$config['network_map_items'] = array('mac','xdp');
```
Either remove mac or xdp depending on which you want.
2017-10-26 15:34:36 -05:00
XDP is based on FDP, CDP and LLDP support based on the device type.
2015-07-18 16:15:57 +01:00
2019-09-09 05:48:35 -05:00
A global map will be drawn from the information in the database, it is
worth noting that this could lead to a large network map. Network maps
for individual devices are available showing the relationship with
other devices. Also you can Build Device Groups and those Device
Groups can be drawn with Network Map.
## Network Map Configurator
2019-09-09 05:48:35 -05:00
[This link](https://visjs.github.io/vis-network/docs/network/) will
show you all the options and explain what they do.
2020-12-30 09:38:14 -05:00
You may also access the dynamic configuration interface [example
2019-09-09 05:48:35 -05:00
here](https://visjs.github.io/vis-network/examples/network/other/configuration.html)
from within LibreNMS by adding the following to config.php
2017-10-26 15:34:36 -05:00
```php
$config['network_map_vis_options'] = '{
"configure": { "enabled": true},
}';
```
2019-09-09 05:48:35 -05:00
### Note
2019-09-09 05:48:35 -05:00
You may want to disable the automatic page refresh while you're
tweaking your configuration, as the refresh will reset the dynamic
configuration UI to the values currently saved in config.php This can
2020-12-30 09:38:14 -05:00
be done by clicking on the Settings Icon then Refresh Pause.
2019-09-09 05:48:35 -05:00
### Configurator Output
2019-09-09 05:48:35 -05:00
Once you've achieved your desired map appearance, click the generate
options button at the bottom to be given the necessary parameters to
2022-07-10 10:46:01 +01:00
add to your config.php file. You will need to paste the generated
2019-09-09 05:48:35 -05:00
config into config.php the format will need to look something like
2020-12-30 09:38:14 -05:00
this. Note that the configurator will output the config with `var options`
you will need to strip them out and at the end of the config you need to
add an `}';` see the example below.
2019-09-09 05:48:35 -05:00
```php
$config['network_map_vis_options'] = '{
2017-10-26 15:34:36 -05:00
"nodes": {
"color": {
"background": "rgba(20,252,18,1)"
},
"font": {
"face": "tahoma"
},
"physics": false
},
"edges": {
"smooth": {
2017-10-26 15:34:36 -05:00
"forceDirection": "none"
}
},
2017-10-26 15:34:36 -05:00
"interaction": {
"hover": true,
"multiselect": true,
"navigationButtons": true
},
"manipulation": {
"enabled": true
},
"physics": {
2017-10-26 15:34:36 -05:00
"barnesHut": {
"avoidOverlap": 0.11
},
2017-10-26 15:34:36 -05:00
"minVelocity": 0.75
}
}';
```
2019-10-07 23:28:06 +02:00
![Example Network Map](/img/networkmap.png)