netbox-community / netbox-topology-views Goto Github PK
View Code? Open in Web Editor NEWA netbox plugin that draws topology views
License: Apache License 2.0
A netbox plugin that draws topology views
License: Apache License 2.0
preselected_device_roles
and others are split on comma. This looks very random to me when we can just pass proper data structures to the plugin. I just tested this with Netbox 2.8.7, works nicely. The file that does the split is https://github.com/mattieserver/netbox-topology-views/blob/master/netbox_topology_views/api/views.py
What do you think?
Thanks for the plugin btw ๐
The save coordinates checkbox currently does nothing.
Hello!
That is possible to show virtualized devices in the topology map? In netbox we could assign the same device roles (firewall, access switch, virtual server, server) to the virtual machines like the phisical devices, but they aren't included in the topology map yet.
Thanks,
Peter
As per the other filter by site, would be great to be able to filter by a region.
Hello
I installed netbox v3 but this plugin is not compatible.
What version of netbox is recommended for this plugin?
Is it possible to add a background image to the topology?
I'm trying to add a custom image for the fiber-cross role.
Add image:
root@netboxansible:/usr/local/lib/python3.8/dist-packages/netbox_topology_views/static/netbox_topology_views/img# ls
access-switch.png firewall.png router.png
backup.png internal-switch.png server.png
cooper-cross.png isp-cpe-material.png storage.png
core-switch.png non-racked-devices.png wan-network.png
distribution-switch.png power-units.png wireless-ap.png
fiber-cross.png role-unknown.png
Add device_img:
PLUGINS_CONFIG = {
'netbox_topology_views': {
'device_img': 'access-switch,core-switch,firewall,router,distribution-switch,backup,storage,wan-network,wireless-ap,server,internal-switch,isp-cpe-material,non-racked-devices,power-units,fiber-cross,cooper-cross',
'preselected_device_roles': 'Distribution switch,CORE switch,Acces switch'
}
}
Added a device with the fiber-cross role. But it is displayed as an alien
If any device selected to a topology is connected to a power feed it shows "something went wrong".
Maybe there is a way to represent power feeds on a topology or at least remove whatever is causing the problem.
Hi,
I've installed this plugin (version 0.4.8) on NetBox (version 2.8.4) and I have this strange behaviour: devices keep rotating without stop in a fixed position.
When I hit the search button (several time) they just stop.
Thanks for the support!
Follow up for #10
please add option to open device page from topology view
Update documentation to reference local_requirements NetBox 2.8+ method
Hello,
I have installed the latest version via pip for both Netbox and this plugin
Netbox: 2.10.3
Netbox Topology Views: 0.4.10
Python: 3.8.5
The only item I added to the configuration.py file is this..
PLUGINS = [
"netbox_topology_views"
]
I've tried adding the PLUGINS_CONFIG
example on the ReadMe but I get the same 404 error.
These errors show up when I browse to the plugin page.
http://my-server:8000/plugins/topology-views/
[20/Jan/2021 07:19:02] "GET /api/plugins/topology-views/preselectdeviceroles/ HTTP/1.1" 404 40993
[20/Jan/2021 07:19:02] "GET /api/plugins/topology-views/preselecttags/ HTTP/1.1" 404 40993
and using the search function I get this.
Any ideas?
Thanks
first of all great plugin!
would like to know if its possible to add the option to query by tag?
Quite often when we look at a device, we know the device we want to visualize but not what it connects to. When you look at cables for a specific device you can see the neighbor..
Not sure if it would be possible, but a check box that allows the user to hide or show neighbors of the device(s) filtered could be quite useful.
Just for other users would be great to have the configuration moving from config file into the gui.
Also having there better possibility to connect icons with device types
Also having maybe there the possibility to upload custom icons
Regards and thanks for this great plugin
Hi would be great to have the possibility to add some background images on saved topologies
Hi,
I'm using your plugin to netbox for a while, which is cool. Thanks for that.
Although, from 2.9.1 I'm getting a message something went wrong and I cannot generate any topology.
How can I debug this and see whats wrong ?
Maybe it is not an issue, maybe I did something wrong, idk. Your plugin is installed according to your readme file.
Thanks.
Would be great to be able to toggle on the interface descriptions of the links on the map and the IP addresses on the devices.
When looking it the map it would be great to see the information but be able to add it only when required to control clutter/information overload.
Where did you get the icon set from? I'd like to add more icons from that set if possible.
It would be great to be able to select a site and draw the topology associated with tenants or tenant groups.
Thank you.
If you have a setup like switch->patch panel->switch, and you pick just "switches" for the device roles to show, you just see two switches floating unconnected. They don't show up as connected unless you also pick the device role your patch panel is under.
While that might be desirable, if you have alot of patch panels, the resulting map is monstrous.
Sorry to be a nuisance, I'm seeing this error, I've located it down to a switch that does bring fibre in, but it doesn't use any circuits. All devices connected are named, so unsure why they're being returned as a NoneType.
Is there a way we can fallback to the device type name if there is no device name? And maybe the same for termination names? (It would fallback to the cable type and an index number to keep it unique until named?)
Internal Server Error: /api/plugins/topology-views/search/search/
Traceback (most recent call last):
File "/srv/netbox/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/srv/netbox/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/srv/netbox/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/srv/netbox/venv/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/viewsets.py", line 114, in view
return self.dispatch(request, *args, **kwargs)
File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/views.py", line 505, in dispatch
response = self.handle_exception(exc)
File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/views.py", line 465, in handle_exception
self.raise_uncaught_exception(exc)
File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
raise exc
File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/views.py", line 502, in dispatch
response = handler(request, *args, **kwargs)
File "/srv/netbox/venv/lib/python3.7/site-packages/netbox_topology_views/api/views.py", line 135, in search
edge["title"] = "Connection between <br> " + cable.termination_a.device.name + " [" + cable.termination_a.name + "]<br>" + cable.termination_b.device.name + " [" + cable.termination_b.name + "]"
TypeError: can only concatenate str (not "NoneType") to str
It would be nice to have a button in the WebGUI to hide unconnected devices. It would improve the readability of the network diagram because there would be less devices in the overview.
in 0.4.0, you could generate topologies of power connections. Very useful.
after version 0.4.1, this stopped working.
I'm trying to figure out what changed, and why the power connections no longer show up..
I'm trying to make the plugin use Cisco network topology icons from here: https://www.cisco.com/c/en/us/about/brand-center/network-topology-icons.html
For this, I downloaded the PMS 3015 EPS package, sanitized the file names to contain only lowercase alpha and dashes and converted them to PNG with ImageMagick.
However, the plugin seems to be unable to use or access them for some reason - I tried both creating new files and overwriting existing ones but it continues using the original icons. Even if I overwrite one of the default icons with another, this is not reflected in the topology view.
I'm using Netbox 2.9.2 in Docker. There are no apparent error messages in any of the logs. File permissions and mode are the same as the shipped images. Browser cache was of course cleared and a different browser was tried. (Chrome and Firefox.) The configuration.py with the plugin config is auto-generated from the files with Ansible and should be correct.
PLUGINS = [
'netbox_topology_views'
]
PLUGINS_CONFIG = {u'netbox_topology_views': {u'device_img': u'softswitch-pgw-mgc,ibm-tower,turret,iad-router,contact-center,15200,metro-1500,hootphone,pc,space-router,sattelite-dish,file-cabinet,voice-atm-switch,pbx-switch,directory-server,wireless,vault,centri-firewall,mobile-streamer,pc-adapter-card,nexus-5000,content-service-switch-1100,mediator,mdu,car,10700,netflow-router,host,mcu,class-4-5-switch,rf-modem,modem,pc-software,workgroup-director,iptc,lightweight-ap,services,generic-processor,tape-array,telecommuter-icon,cisco-unified-presence-server,microphone,file-server,key,optical-amplifier,standing-woman,firewall,ciscosecurity,system-controller,generic-gateway,multilayer-remote-switch,me-1100,3x72,content-transformation-engine,optical-services-router,protocol-translator,relational-database,storage-router,router-firewall,tv,wism,cisco-asa-5500,man-woman,axp,generic-building,handheld,longreach-cpe,ios-firewall,nce,ciscoworks,icm,wireless-bridge,wireless-router,gatekeeper,cddi-fddi,ip-telephony-router,layer-2-remote-switch,dslam,vsd,cs-mars,speaker,sip-proxy-werver,umg-series,simulitlayer-switch,bts-10200,virtual-layer-switch,cisco-unityexpress,gigabit-switch-atm-tag-router,upc,dual-mode-ap,pxf,iscsi-router,macintosh,government-building,wlan-controller,callmanager,content-switch-module,pbx,layer-3-switch,page-icon,wae,svx,cloud,radio-tower,cellular-phone,www-server,ace,printer,vpn-gateway,tp-mcu,cable-modem,wireless-transport,fibre-channel-fabric-switch,unity-server,octel,atm-tag-switch-router,standing-man,small-business,content-switch,content-engine,stp,intelliswitch-stack,6700-series,ssl-terminator,7500ars,running-man,truck,tdm-router,bridge,ata,fc-storage,microwebserver,keys,small-hub,jbod,service-router,mau,fax,dwdm-filter,acs,pc-man,wireless-location-appliance,router-with-silicon-switch,localdirector,carrier-routing-system,itp,route-switch-processor,accesspoint,diskette,hub,ground-terminal,cdm,dpt,branch-office,ibm-mini-as400,netranger,university,laptop,nac-appliance,ics,multi-fabric-server-switch,hp-mini,phone-fax,stb,router,meetingplace,server-switch,softphone,androgenous-person,atm-router,sattelite,universal-gateway,pc-routercard,mac-woman,mini-vax,csm-s,ubr910,bbfw,mgx-8000-multiservice-switch,nce-router,communications-server,mux,fibre-channel-disk-subsystem,internet-streamer,nexus-2000,routerin-building,streamer,general-applicance,asr-1000-series,standard-host,tablet,atm-fast-gigabit-etherswitch,voice-router,mulitswitch-device,lock,telecommuter-house-pc,adm,mobile-access-ip-phone,voice-commserver,pad-x-28,terminal,mobile-access-router,software-based-server,safeharbor-icon,cube,wi-fi-tag,transpath,access-gateway,workgroup-switch,asic-processor,voice-switch,100baset-hub,mxe,iptv-content-manager,detector,optical-transport,sun-workstation,network-management,vss,nexus-7000,server-with-router,phone,mesh-ap,antenna,token,front-end-processor,lan-to-lan,service-control,3200-mobile-access-router,telecommuter-house,h-323,ios-slb,distributed-director,nexus-1000,3174,ip-communicator,workstation,pmc,vpn-concentrator,wavelength-router,video-camera,avs,guard,10ge-fcoe,sitting-woman,dot-dot,mse,programmable-switch,content-service-router,bbfw-media,director-class-fibre-channel-director,set-top-box,moh-server,repeater,breakout-box,virtual-switch-controller,generic-softswitch,atm-switch,bbsm,fileserver,end-office,pad,pix-firewall,pc-video,csu-dsu,rpsrps,pda,ip-phone,web-browser,mas-gateway,isdn-switch,vip,netsonar,iptv-server,scanner,firewall-service-module,cisco-ca,cisco-1000,supercomputer,ip,ups,service-module,ibm-mainframe,storage-server,fddi-ring,ssc,ip-dsl,atm-3800,cisco-hub,broadband-router,ons15500,cisco-file-engine,ratemux,web-cluster', u'preselected_device_roles': u'Firewall,Router,Core Switch,Access Switch,Server,Storage,Wireless AP,Desktop'}}
The PNGs, according to file
are:
firewall.png: PNG image data, 63 x 138, 16-bit/color RGB, non-interlaced
(Of varying sizes.) One thing that might lead to this is that the images need to be square, or 8-bit, or RGBA, or something else but your README doesn't specify and I've been unable to find out experimentally.
Side note -- the plugin clobbers my images every time the container is built or restarted which isn't very nice. It would be great to have a way of disabling the default images.
Hi.
I can't see any of my topologies and I have no idea why.
I always use tags to create topologies, marking which devices belong to which topology.
Some time ago there was only one topology I couldn't see, and I had no idea why. First I thought it was due to power feed connections, but it was not. Although if you put any device connected to a power feed it brakes topology visualization.
Now, I can't do nothing. Than I thought, maybe, it was due to coordinates, so I deleted the custom field and created again. The problem persists, and everything I do I get "something went wrong".
Is the any way to enable a debug mode, so I can fix it. In general, everything was pretty fine.
Netbox: 2.11.12
Python: 3.8.6
netbox-topology-views: 0.5.3
I cannot seem to be able to drag a device to a place on the screen and have it stay. it snaps back and floats. I am using Chrome (latest). Is this a browser issue or plugin issue
Looks like the plugin is ignoring some parameters inside configuration.py and on filter menu on UI.
I chose "Firewall" and "Router" as preselected device roles, but it does not appear when I open the plugin.
The only filter that looks to be functional is "Site". When I filter other thing it keeps showing all devices in that site.
The "Save coordinates" button does not appear anymore, and looks like it is not changing coordinates.
Netbox 3.1.8.
There is some incorrect behaviour on a default netbox install.
You can use the plugin when you are not logged in but on the default netbox install you cannot view anything when not logged in.
The topology map does not render links between parent/child devices in physical chassis bays. Would be nice to have the child device icons linked directly to the parent device, so that they all stay together as a group.
Firstly Topology tool is great, its excellent to be able to visualize netbox data.
In order to make it more extensible, it would be great to able to add Parameters to URL to filter the map.
etc
EG $NETBOX_URL/plugins/topology-views/?=sitename&role=Switch
From here a user could easily create custom links within netbox pages sites / devices to link to a related map.
Can you help me with this errors ?
https://mail.google.com/mail/u/0/?tab=rm&ogbl#inbox/FMfcgxwKjwwJgwfKslMBwvMGmxrLltDt
after update netbox to new version
ile "/usr/lib64/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/opt/netbox/netbox/netbox/urls.py", line 8, in
from extras.plugins.urls import plugin_admin_patterns, plugin_patterns, plugin_api_patterns
File "/opt/netbox/netbox/extras/plugins/urls.py", line 35, in
urlpatterns = import_object(f"{plugin_path}.api.urls.urlpatterns")
File "/opt/netbox/netbox/extras/plugins/utils.py", line 31, in import_object
spec.loader.exec_module(module)
File "/opt/netbox/venv/lib64/python3.6/site-packages/netbox_topology_views/api/urls.py", line 3, in
from .views import PreSelectDeviceRolesViewSet, SearchViewSet, SaveCoordsViewSet, PreSelectTagsViewSet
File "/opt/netbox/venv/lib64/python3.6/site-packages/netbox_topology_views/api/views.py", line 9, in
from utilities.api import IsAuthenticatedOrLoginNotRequired
ImportError: cannot import name 'IsAuthenticatedOrLoginNotRequired'
Hiya there,
I seem to have an issue with Circuit Terminations showing.
Everything works and is fine if not involving any circuits, but as soon as you include a device or site that holds a circuit termination, I get the following error.
Internal Server Error: /api/plugins/topology-views/search/search/
Traceback (most recent call last):
File "/srv/netbox/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/srv/netbox/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/srv/netbox/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/srv/netbox/venv/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/viewsets.py", line 114, in view
return self.dispatch(request, *args, **kwargs)
File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/views.py", line 505, in dispatch
response = self.handle_exception(exc)
File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/views.py", line 465, in handle_exception
self.raise_uncaught_exception(exc)
File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
raise exc
File "/srv/netbox/venv/lib/python3.7/site-packages/rest_framework/views.py", line 502, in dispatch
response = handler(request, *args, **kwargs)
File "/srv/netbox/venv/lib/python3.7/site-packages/netbox_topology_views/api/views.py", line 133, in search
edge["to"] = cable.termination_b.device.id
AttributeError: 'CircuitTermination' object has no attribute 'device'
when you enable the Circuit Termination you may see the following error:
AttributeError: 'CircuitTermination' object has no attribute 'device'
Also see #20
Hi, how add own role or slugs in this plugin?
Because, my devices dont have next names (roles, slugs) Router, Firewall and so on.
2.11 enables locations to classify of sub locations of a site.
It would be great to be able to filter Locations like we do Regions as this will allow a user to easily show a building, floor, or room within a location.
As I understand it the only way to export images is to right click on the visualisation then click "save image as".
This works great for a small number of nodes but for example we have a site with 800+ cables and i can either zoom in and save an image of just a few nodes or zoom out and save an image which does not have enough resolution to be legible.
Maybe a "save full topology as image" feature which then exports the entire thing at a customizable resolution.
First of all thank you for this great plugin.
I would like to if there is way to show VLANs in topology?
When modelling connections to a virtual chassis interfaces appear as separate devices on the map.
Not sure how difficult this would be but, perhaps the switch members of a chassis should be connected by by default as they represent 1 logical device.
Is it possible to have topology with fixed position icons?
netbox does show any url created in netbox_topology_views/api/urls.py on the api page.
As an FYI here is what changed that could impact or help the plugin:
If you find any issues or have any questions feel free to hit us on the slack or add a bug /issue or add to the umbrella UI issue netbox-community/netbox/issues/6797
Not sure of the best way to do this, but It would be great if you could visualize A and Z separately on a map with perhaps the circuit ID.
Most of our sites have circuits that are not point to point (for example a direct internet link or IP/VPN). Because they don't connect to another device you can can't yet see the visualization of the circuit.
Also when you search a site you don't see the circuit unless you also search the head end.
By being able to visualize both A and Z separately you would cover both use cases whilst also enriching the Site Map with circuit data.
Nginx returns 502 Bad Gateway error after Plugin installation and activation. Netbox: v2.9.8, Netbox_topology_views: v0.4.10
It would be nice to show in the topology only interfaces end to end relationship, as on the deprecated built-in feature.
This way, we don't need to bring patch panels and other intermediary/passive gear to the topology.
Some times I need to tag 2 or 3 devices to reach the far end device in witch I need it to show up.
Look at the picture below. I just need the black phone to show directly connected to the switch.
Saving filter in url parameter in #32 is quite good. It would be great if saving topology views in netbox itself would be possible.
So the views does not News to be "build" with the filter for often used views every time.
I think about a dropdown where you can choose on saved views.
An additional save button with a textfield for a name would be required.
I'd like to be able to draw topologies based on rack rows.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.