Traffic Map
The Traffic Map is a live neighbour topology map that renders LLDP/CDP neighbour relationships as an interactive graph. Edges are coloured by real-time traffic utilisation, nodes are colour-coded by device status, and the whole map can be filtered by device, VLAN, or group.
The map is built on Cytoscape.js using the fCOSE force-directed layout engine.
Accessing the Traffic Map
Navigate to Maps > Traffic Map from the main navigation bar.
Filters
The navbar provides three filter menus that can be combined:
| Filter | Description |
|---|---|
| Devices | Limit the map to a single device and its direct neighbours. |
| VLANs | Show only neighbours whose ports participate in the selected VLAN. |
| Groups | Show only neighbours belonging to a device or port group. |
Selecting a filter updates the URL so the result can be bookmarked or shared.
Port Labels
The Port Labels button in the navbar toggles interface name labels at each end of every edge.
- The label at the source end shows the local port name.
- The label at the target end shows the remote port name.
Port labels use the short port label (port_label_short) from the database.
Map Controls
A control bar sits above the map canvas.
| Control | Action |
|---|---|
| Fit | Zooms and pans the canvas so all nodes are visible with padding. |
| Reset Zoom | Returns to 1:1 zoom, centred on the graph. |
| Zoom slider | Drag to zoom between 10 % and 300 %; current level is shown as a percentage. |
| Export PNG | Downloads the complete graph (including off-screen nodes) as a high-resolution PNG (traffic-map.png). The export is rendered at 2× scale on a light background. |
| Re-arrange | Re-runs the fCOSE layout algorithm to produce a fresh arrangement. Useful after filtering changes the node count significantly. |
| Refresh | Immediately fetches fresh traffic utilisation data for all edges from the server and updates colours and widths in place. Node positions are not affected. |
| Auto: Off / On | Toggles a 60-second automatic refresh interval. When turned on, the first refresh fires immediately. The time of the last successful refresh is displayed to the right of the button. |
| Tooltips: On / Off | Toggles hover tooltips for all nodes and edges. Turning tooltips off also hides any currently-visible popup. |
The mouse scroll wheel also zooms (sensitivity 0.25 per notch). Nodes can be dragged to reposition them manually.
What refreshes and what doesn't
The auto-refresh updates edge traffic data (colours, arrow colours, widths) and node status indicators (down/disabled borders). It does not re-query the neighbour topology. If a new neighbour is discovered after the page loads, a full page reload is needed to show it.
Clicking a Node
Clicking a node highlights it and dims the rest of the map, making its direct connections and neighbours stand out. Clicking the same node a second time navigates to that device's detail page. Clicking the canvas background clears the highlight.
Hover Tooltips
Hovering over a node shows a device summary popup loaded on demand from ajax/entity_popup.php.
Hovering over an edge shows a port stats popup for the local port at that end of the link, also loaded from ajax/entity_popup.php. A 150 ms delay on both prevents flooding requests when the cursor moves quickly across the map.
Edge Traffic Colouring
Each edge is coloured according to the average of inbound and outbound utilisation on the local port. The two arrow heads are coloured independently — the source arrow reflects outbound utilisation and the target arrow reflects inbound utilisation — so asymmetric links are immediately visible.
Edge width reflects the port's configured interface speed, giving an immediate sense of link capacity alongside utilisation colour:
| Width | Speed |
|---|---|
| 1 px | ≤ 100 Mbps |
| 2 px | ~1 Gbps |
| 4 px | ~10 Gbps |
| 5–8 px | 100 Gbps+ |
Utilisation values come from ifInOctets_perc and ifOutOctets_perc in the ports table, which are updated every polling cycle.
Colour Scale
| Colour | Utilisation |
|---|---|
| Grey | 0 – 1 % |
| Indigo | 1 – 10 % |
| Blue | 10 – 25 % |
| Sky blue | 25 – 40 % |
| Lime | 40 – 55 % |
| Yellow | 55 – 70 % |
| Amber | 70 – 85 % |
| Deep pink | 85 – 95 % |
| Dark red | 95 – 100 % |
| Mid grey | Port operationally down |
The same scale is used on the Traffic Map (html/ajax/map_data.php) so colours are consistent across both views.
A legend below the map canvas reproduces this scale for quick reference.
Node Status Indicators
Node borders indicate device health:
| Border | Meaning |
|---|---|
Red (#FB7E81), 3 px |
Device is down (unreachable at last poll). |
Grey (#919191), 3 px, 60 % opacity |
Device is disabled (excluded from polling). |
Device Type Indicators
Nodes also carry a subtle border tint based on device type:
| Border | Device type |
|---|---|
Orange (#ffa500), 2 px |
Firewall |
Green (#00c04b), 2 px |
Wireless |
Status indicators (down / disabled) take precedence over type tints.
Layout Algorithm
The map uses the fCOSE (Fast Compound Spring Embedder) layout. Key parameters:
nodeRepulsion: 4500idealEdgeLength: 45nodeSeparation: 100gravity: 0.25
These values work well for mid-sized networks (20–200 nodes). For very large networks the Re-arrange button can be used to request a fresh layout pass with higher quality settings (quality: "proof").
Prerequisites
The Traffic Map requires neighbour data collected by LLDP or CDP autodiscovery. If no data is displayed, verify that:
- LLDP/CDP is enabled on the monitored devices.
- The
neighboursautodiscovery module is running (discovery.php -m neighbours). - At least one active neighbour relationship exists in the
neighbourstable.
Permissions
The Traffic Map is accessible to all authenticated users. Neighbour visibility is subject to the standard device permission rules.