Documentation Index

Fetch the complete documentation index at: https://docs.lansweeper.com/llms.txt

Use this file to discover all available pages before exploring further.

Troubleshoot the traffic sensor - Windows

Prev Next

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

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.


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 --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 --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 following in PowerShell as an administrator and sanitize secrets before sharing externally:

# Create a support bundle directory
New-Item -ItemType Directory -Path "$env:TEMP\sensor_support_bundle" -Force
Set-Location "$env:TEMP\sensor_support_bundle"
# System info
Get-Date -Format o | Out-File timestamp.txt
[System.Environment]::OSVersion | Out-File os_version.txt
Get-ComputerInfo | Select-Object WindowsProductName, WindowsVersion, OsBuildNumber | Out-File system_info.txt
Get-PSDrive C | Select-Object Used, Free | Out-File disk_space.txt
Get-NetIPAddress | Out-File ip_addresses.txt
Get-NetAdapter | Out-File net_adapters.txt
# Service status
Get-Service "Lansweeper Network Discovery Traffic Sensor Service" | Format-List * | Out-File service_status.txt
# Sensor version
& "C:\Program Files\Lansweeper Network Discovery\sensors\Traffic\bin\lansweeper-traffic-sensor.exe" --console --version | Out-File .\sensor_version.txt
# Available capture interfaces
& "C:\Program Files\Lansweeper Network Discovery\sensors\Traffic\bin\lansweeper-traffic-sensor.exe" --console --print-devices | Out-File capture_interfaces.txt
# Copy Log files to support bundle
$logSource = "C:\Program Files\Lansweeper Network Discovery\sensors\Traffic\logs"
if (Test-Path $logSource) {
    New-Item -ItemType Directory -Path ".\logs" -Force | Out-Null
    Copy-Item "$logSource\*" ".\logs\" -Recurse
}
# Npcap status
Get-Service npcap | Out-File npcap_status.txt 2>&1
# Certificate state
Get-ChildItem "C:\Program Files\Lansweeper Network Discovery\sensors\Traffic\certs" -ErrorAction SilentlyContinue | Out-File cert_state.txt 2>&1
# Configuration (sanitize secrets before sharing)
Copy-Item "C:\Program Files\Lansweeper Network Discovery\sensors\Traffic\lansweeper-traffic-sensor.toml" .

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