↳ GitHub sourceAnalytics ruleMedium
UniFi Site Manager: Controller Connection State Change
Description
Identifies when a UniFi controller (Cloud Key, Dream Machine, etc.) experiences a connection state change, which may indicate a network outage, power loss, or device failure.
- Rule type
- Scheduled
- Version
- 1.0.1
- Declared status
- Available
- Query frequency
- 15m
- Query period
- 1h
- Trigger
- gt 0
Declared MITRE coverage
Declared sources
Metadata from the source file. No dependencies inferred from KQL.
Connectors
Data types
KQL query
Original query, unchanged.
// UniFi Controller Connection State Change Detection
// Only fire when LastConnectionStateChange has changed since the prior 15-min cycle
// to avoid 4-5 alerts per actual state change (rule runs every 15m, change visible for 1h).
let prev = Unifi_SiteManager_Hosts_CL
| where TimeGenerated between (ago(30m) .. ago(15m))
| summarize arg_max(TimeGenerated, *) by Id
| project id_s = Id, prevChange = todatetime(LastConnectionStateChange);
Unifi_SiteManager_Hosts_CL
| where TimeGenerated > ago(15m)
| where isnotempty(LastConnectionStateChange)
| summarize arg_max(TimeGenerated, *) by Id
| extend
ConnectionChange = todatetime(LastConnectionStateChange),
id_s = Id
| join kind=leftouter prev on id_s
| where ConnectionChange != prevChange or isnull(prevChange)
| where ConnectionChange > ago(30m)
| extend
HostTypeDisplay = case(
HostType == "ucore", "UniFi OS Console",
HostType == "uck", "Cloud Key",
HostType == "uckp", "Cloud Key+",
HostType == "udm", "Dream Machine",
HostType == "udmpro", "Dream Machine Pro",
HostType == "udmse", "Dream Machine SE",
HostType == "self-hosted", "Self-Hosted",
HostType
)
| project
TimeGenerated,
ConnectionChangeTime = ConnectionChange,
PreviousChangeTime = prevChange,
HostId = Id,
HostType = HostType,
HostTypeDisplay,
IPAddress = IpAddress,
IsBlocked = IsBlocked,
IsOwner = Owner
Declared entities
Related content
Links established from declared identifiers and solution manifests.
Source provenance
GitHubDisplayed values come from files in Azure/Azure-Sentinel. They describe the published template, not your workspace configuration.
- File
- Solutions/UniFi Site Manager (CCF)/Analytic Rules/UniFiCloudControllerConnectionStateChange.yaml ↗
- Commit
9800e51↗- Source identifier
ac1efe0f-654e-264e-07be-c1b60e698343
GSTEP / CATALOG TRACKING
Added to catalog : 16 Sept 2026 · 05:49 UTC
Last change observed : 16 Sept 2026 · 05:49 UTC