Skip to main content

Unifi Fabric

@sntxrr/unifi-fabricv2026.08.20.1· 2d agoMODELS
01README

Structural health monitoring for a UniFi fabric. The @sntxrr/unifi-fabric/topology model's check method compares a declared topology against live /stat/device rows and reports the failures that outcome-based monitoring cannot see: a device expected on the wire that has silently fallen back to a wireless mesh uplink, attachment to the wrong upstream device, links negotiated below their expected speed, ports carrying error counters, and — the one with no equivalent elsewhere — ports that are down but have carried real traffic before, which identifies a run that used to work. An access point that loses its wired uplink does not fail; it meshes, keeps serving clients, and every uptime check stays green while latency quietly goes from sub-millisecond to tens of milliseconds and jittery. uplink.type flipping from wire to wireless is a boolean, so it is asserted exactly rather than thresholded. Read-only: never writes to the controller. Emits a flat Prometheus-ready metric series alongside the verdict, including for healthy devices, so alerts can fire on a series dropping to zero rather than on a document changing shape. Authenticates with an API key over X-API-KEY, which sidesteps the HTTP 499 that MFA-enabled SSO accounts return for password logins.

02Models1
@sntxrr/unifi-fabric/topologyv2026.08.20.1unifi_fabric.ts

Global Arguments

ArgumentTypeDescription
hoststringUniFi OS console IP or hostname, e.g. 192.0.2.1
apiKeystringAPI key issued under Settings → Control Plane → Integrations (use a
sitestringUniFi site name
fn check(links: array, ports: array, darkPortByteThreshold: number)
Compare a desired fabric topology against live UniFi devices. Reports wireless uplinks where wire was expected, wrong uplink parents, under-negotiated links, erroring ports and down-but-previously-used ports. Read-only — never writes to the controller.
ArgumentTypeDescription
linksarrayHow each device should be attached to the fabric.
portsarraySwitch ports whose speed is worth asserting.
darkPortByteThresholdnumberBytes a down port must have carried before it is reported as a run

Resources

fabric(infinite)— Comparison between a desired UniFi fabric topology and how devices are actually attached, plus port speed and error health.
03Stats
A
100 / 100
Downloads
0
Archive size
15.7 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
04Platforms
05Labels