Troubleshoot the traffic sensor - Windows

Prev Next

You can use this list to troubleshoot the traffic sensor on Windows. Verify the basics first, apply relevant quick fixes if checks fail, and collect diagnostic data to gather logs and system details for further support.

Open beta

The traffic sensor is currently in open beta. Some features and requirements may still change as we refine the product.

Validation checklist

Is the service running?

Check the Windows Service state. Open a terminal as an administrator:

Get-Service "Lansweeper Network Discovery Traffic Sensor Service"

If the service is stopped, restart it from the Windows Service Center: right-click Lansweeper Network Discovery Traffic Sensor Service and select Restart.
If the issue persists, check the logs for any error output:

cd "C:\Program Files\Lansweeper Network Discovery\sensors\Traffic\logs"
notepad.exe .\lansweeper-traffic-sensor

How can I validate that traffic is reaching the capture NIC?

Navigate to where the traffic sensor binary is on your machine and list the available capture interfaces:

.\lansweeper-traffic-sensor.exe --console --print-devices

On Windows, network interfaces are identified by WinPcap GUIDs (e.g., \Device\NPF_{GUID}) rather than friendly names. Use --print-devices to map GUIDs to interface descriptions.

Run a short packet capture on the intended interface using pktmon (built into Windows 10 1809+ / Server 2019+). This requires an admin PowerShell session. Replace <id> with the component ID from pktmon list that matches your capture NIC:

pktmon list
pktmon start --capture --comp <id>
pktmon stop
pktmon counter

If you see packets in the output, traffic is arriving. If no packets appear, the issue is likely upstream: check your mirroring, TAP, or ERSPAN configuration, or confirm you're capturing on the correct interface.

Confirm the Npcap driver is running as this is required for the traffic sensor to work:

Get-Service npcap

How can I validate that the traffic sensor is producing output files?

Navigate to the traffic sensor install directory (by default C:\Program Files\Lansweeper Network Discovery\sensors\Traffic) and confirm files are being written:

Get-ChildItem ".\flows" | Sort-Object LastWriteTime -Descending | Select-Object -First 10

How can I validate that the sensor is linking to the hub successfully?

Navigate to your hub_url and check the sensor’s route to confirm your traffic sensor is listed with a status of up:

https://localhost:59525/sensors

You can also check out the sensor logs and look for hub connectivity messages:

cd "C:\Program Files\Lansweeper Network Discovery\sensors\Traffic\logs"
notepad.exe .\lansweeper-traffic-sensor

A successful connection will show "Hub acknowledged sensor start". If linking fails, you will see error messages related to hub code validation, certificate exchange, or network connectivity.

Common issues and quick fixes

The service shows "Stopped" or fails to start. What should I collect first?

View the sensor logs to capture startup errors:

cd "C:\Program Files\Lansweeper Network Discovery\sensors\Traffic\logs"
notepad.exe .\lansweeper-traffic-sensor

Common causes to check next:

  • Invalid configuration: check that sensor_id and hub_url are set correctly. If either value looks wrong, re-download the traffic sensor package, as the installer sets these by default.
  • Permissions: the traffic sensor must run as a system user

The service is running, but no output files appear. What should I check?

Ensure there is sufficient disk space, then run .\lansweeper-traffic-sensor.exe --console and look for capture or write errors. If errors appear, note the message and refer to the relevant section below. If no errors appear and disk space is fine, contact support with the diagnostic bundle.

No traffic is visible on any interface. What's the most likely issue?

Start by confirming you're checking the correct interface, then work backwards to the upstream feed:

  • Verify the correct interface with .\lansweeper-traffic-sensor.exe --console --print-devices
  • Confirm the mirror, TAP, or ERSPAN source is physically connected (or that ERSPAN is delivered to the correct endpoint)
  • Check that the SPAN includes the correct VLANs and direction (ingress/egress/both)
  • Check that the feed isn't oversubscribed: SPAN congestion can drop mirrored packets

By default, the sensor attaches to all non-loopback interfaces automatically. If packet_sources is set in lansweeper-traffic-sensor.toml, auto-detection is disabled and only those interfaces are used.

Certificate errors are preventing hub communication. What should I do?

Check whether certificates exist in the certs directory within the install path:

Get-ChildItem "<install_dir>\certs\*.pem"

If the directory is empty or missing, the sensor is not linked. The sensor will automatically renew certificates when they're close to expiring. If that process failed, remove the certs directory and re-link:

Stop-Service "Lansweeper Network Discovery Traffic Sensor Service"
Remove-Item "<install_dir>\certs" -Recurse -Force
Start-Service "Lansweeper Network Discovery Traffic Sensor Service"

If linking to a remote hub, place a fresh hubcode.txt with a valid hub code in the root install directory before restarting the service.

The sensor was working, but stopped after a reboot. What do I check?

Confirm the service is set to start automatically:

Get-Service "Lansweeper Network Discovery Traffic Sensor Service" | Select-Object Name, Status, StartType

If StartType is not Automatic, update it:

Set-Service "Lansweeper Network Discovery Traffic Sensor Service" -StartupType Automatic
Start-Service "Lansweeper Network Discovery Traffic Sensor Service"

Collect diagnostic data

What information should I gather for support/troubleshooting?

Run the log collector tool that ships with Lansweeper Network Discovery. It bundles the traffic sensor logs, together with the hub and installer logs, event logs, and system info, into a single .zip archive.

  1. Open PowerShell as Administrator on the machine where the traffic sensor is installed.

  2. Run the following command:

    C:\Program Files\Lansweeper Network Discovery\tools\gatherlogs\gatherlogs.ps1
    
  3. Wait for the script to complete. A .zip file is created automatically.

  4. Attach the generated .zip to your bug report or share it with Lansweeper Support.

If you used a custom install location, replace the default path above with your actual install directory.

For more details, see Gather logs for support.