Observe real-time traffic in Wireshark
NetCap allows you to view traffic streams in real-time directly in WiresharkOpens in a new tab using an HTTP endpoint. You can connect to:
- NetCap Sink – to view aggregated traffic from multiple sources
- NetCap Collector – to view traffic captured on a specific Data Plane node
Follow these steps to view aggregated traffic from NetCap Sink:
Use port forwarding to access a NetCap Sink pod:
bashThis command maps port
9999on your local machine, allowing direct access to the streaming service.Use an HTTP request to fetch the traffic stream and redirect it to Wireshark:
bashThis command performs the following actions:
curl --compressed- starts a cURL and requests a server to perform the request compression and decompression before writing data to a pipe.localhost:9999/pcap/TARGET1- URL to the forwarded NetCap API port with a name of a traffic stream TARGET1, which corresponds to aNetCaptureJobCR name or target defined in netcapCollector.streams[].source.memif.targets.-N- disables pipe buffering to ensure real-time updates in Wireshark.| wireshark -k -i -- sends (pipes) the output from curl directly into Wireshark, which starts analyzing the stream immediately.-o 'gui.window_title:netcap-stream'- sets the Wireshark window title for easy identification.-o 'capture.no_interface_load:TRUE'- prevents Wireshark from listing local interfaces, which speeds up the startup.
As a result, you see real-time traffic in Wireshark.