banshee is under active development: collectors will keep changing, and a version you publish will likely need adjustments. For stable use, wait for version 1.0.0.

Windows

banshee/windows-collection/windows/ssh/

interfaces

The state, traffic, errors and IPv4 addresses of each network adapter of a Windows, by SSH and PowerShell

  • windows
  • ssh
  • powershell
  • network
  • interfaces

by banshee1 installation2 versions

v2Latest

Published on October 28, 2026. One naming convention across collections; documentation completed.

Network interfaces of a Windows, by SSH

Returns the state, the speed, the traffic, the errors and the IPv4 addresses of each network adapter of a Windows. Eleven watches are proposed, each one set on the probe.

Versions

Windows Server 2012 and later, Windows 8 and later: Windows PowerShell 3.0 and the modules NetAdapter and NetTCPIP, which the collector needs, ship with each of them; the OpenSSH server is built in from Windows Server 2019 and Windows 10 1809, installed from Win32-OpenSSH before. Generic: no folder of version. That every release answers alike is assumed, not yet checked on a real Windows.

How it works

The collector runs one PowerShell command that reads three lists, joined by the name of the adapter:

powershell -NoProfile -NonInteractive -Command "[Console]::OutputEncoding = New-Object System.Text.UTF8Encoding; ConvertTo-Json -Compress -Depth 4 -InputObject @{adapters = @(Get-NetAdapter | Select-Object Name, State, InterfaceOperationalStatus, ReceiveLinkSpeed, TransmitLinkSpeed, MtuSize); statistics = @(Get-NetAdapterStatistics | Select-Object Name, ReceivedBytes, SentBytes, ReceivedUnicastPackets, ReceivedMulticastPackets, ReceivedBroadcastPackets, SentUnicastPackets, SentMulticastPackets, SentBroadcastPackets, ReceivedPacketErrors, OutboundPacketErrors, ReceivedDiscardedPackets, OutboundDiscardedPackets); addresses = @(Get-NetIPAddress -AddressFamily IPv4 | Select-Object InterfaceAlias)}"
  • Get-NetAdapter, Get-NetAdapterStatistics and Get-NetIPAddress read the CIM classes MSFT_NetAdapter, MSFT_NetAdapterStatisticsSettingData and MSFT_NetIPAddress; their modules, NetAdapter and NetTCPIP, ship with every Windows from Server 2012 and Windows 8 on.
  • An adapter is named as in "Network Connections" (Ethernet, vEthernet (Default Switch)). The hidden adapters of the network stack (WAN Miniport, filters, tunnels) are not listed by Get-NetAdapter.
  • The link state is InterfaceOperationalStatus in the words of IF-MIB: up, down, testing, unknown, dormant, notpresent, lowerlayerdown. A disabled adapter (State 3) is said disabled, so that it does not pass for a link down.
  • The negotiated speed is the slower of the two directions, in Mbit/s; an adapter that is down has none.
  • The traffic, the packets, the errors and the drops are the rates of the counters between two runs: nothing at the first run.
  • The output is written in UTF-8 without a byte order mark, so that an adapter name outside ASCII reads right.
  • No adapter at all, or an answer that is not the expected JSON, stops the collector as misconfigured.

Nothing is written to the Windows: the command only reads.

Prerequisites

  • The OpenSSH server of Windows, installed and started: - on Windows Server 2019 and later, Windows 10 (version 1809 and later) and Windows 11, where it is built in: the optional feature "OpenSSH Server" (Settings, Optional features; or Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 in PowerShell), then the service sshd started and set to start automatically; - on Windows Server 2012, 2012 R2 and 2016, Windows 8, 8.1 and the earlier Windows 10, where it is not built in: OpenSSH for Windows installed from its Microsoft release (Win32-OpenSSH), then the service sshd started and set to start automatically.
  • The default shell of the OpenSSH server left at cmd.exe, as it is installed: the collector starts PowerShell itself, and a command meant for cmd.exe would be read differently by a PowerShell default shell.
  • Windows PowerShell 3.0 or later, as shipped with every Windows from Server 2012 and Windows 8 on (3.0 on Server 2012, 4.0 on 2012 R2, 5.1 from 2016 on).
  • An account for monitoring, without administrator rights, member of the local groups "Performance Monitor Users" and "Event Log Readers", so that the performance counters and the System log are not refused to it. banshee reads it in protocol:ssh:user, with its password in protocol:ssh:password or its key in protocol:ssh:private-key (the public key then in C:\Users\<account>.ssh\authorized_keys).
  • The fingerprint of the server's host key, set in protocol:ssh:fingerprint (on the server, C:\ProgramData\ssh\ssh_host_ed25519_key.pub); not needed when the Security settings trust the first SSH fingerprint presented.
  • The Windows firewall open to the poller on TCP 22 (the rule "OpenSSH SSH Server (sshd)", created with the feature).

Outputs

NameLabelUnitPer instance
linkLink state—yes, per interface
speedNegotiated speedMbit/syes, per interface
mtuMTU—yes, per interface
traffic-inInbound trafficbit/syes, per interface
traffic-outOutbound trafficbit/syes, per interface
trafficTotal trafficbit/syes, per interface
in-percentInbound usage%yes, per interface
out-percentOutbound usage%yes, per interface
packetsPacketspackets/syes, per interface
errorsErrorserrors/syes, per interface
dropsDropspackets/syes, per interface
drop-percentShare of packets dropped%yes, per interface
addressesIPv4 addresses—yes, per interface

Watches

NameTitleKindDefaultsChecked by default
link-downLink downstate to avoid, on linkcritical on down and lowerlayerdown; no warningyes
speed-degradedNegotiated speed degradedjudged by the collectorwarning when the negotiated speed is below the expected speed, 1000 Mbit/sno
saturation-inInbound saturationabove a threshold, on in-percentwarning above 70 %, critical above 90 %, for 5 minyes
saturation-outOutbound saturationabove a threshold, on out-percentwarning above 70 %, critical above 90 %, for 5 minyes
errorsErrorsjudged by the collectorwarning above 1 error per minute; critical above 0.1 % of the trafficyes
dropsPackets droppedabove a threshold, on drop-percentwarning above 0.5 %, critical above 2 %yes
traffic-unusualUnusual trafficoff its habit, on trafficnormal sensitivity, never under 10,000,000 bit/s (10 Mbit/s)no
muteSilent interfaceno activity, on packetswarning after 10 min at zero packets; no criticalno
missingInterface missingexpected instances, on linkno interface named: it raises nothing until names are set on the probeno
mtuUnexpected MTUexpected value, on mtuwarning when the MTU is anything but 1500; no criticalno
no-addressNo IPv4 address leftbelow a threshold, on addressescritical below 1; no warningno

"Unusual traffic" needs the history of the measure: until the poller has learnt it, the watch says it is learning and raises nothing.

Limits

  • A cable unplugged from a port that is not used raises "Link down": disable the adapter, or leave it out of the selection.
  • Neither the duplex nor the changes of a link are served: a link that flaps between two runs is not seen.
  • Only IPv4 addresses are counted.
  • An adapter renamed is a new instance, and the former one goes missing.
  • Not yet checked on a real Windows: the property State of MSFT_NetAdapter and its value 3 for a disabled adapter, and the commands Get-NetAdapter* run by an account without administrator rights.