SWQL Library
Nodes
Aggregation
POLARISNOC Certified

Nodes by Location and Site Code

What this query does

Group and count nodes by physical location for site-level capacity reporting

SWQL Query
SELECT n.Location, cp.SiteCode, cp.Country,
       COUNT(*) AS NodeCount,
       SUM(CASE WHEN n.Status = 1 THEN 1 ELSE 0 END) AS UpCount,
       SUM(CASE WHEN n.Status = 2 THEN 1 ELSE 0 END) AS DownCount
FROM Orion.Nodes n
JOIN Orion.NodesCustomProperties cp ON n.NodeID = cp.NodeID
GROUP BY n.Location, cp.SiteCode, cp.Country
ORDER BY NodeCount DESC
nodes
location
site
inventory
capacity
Source:POLARISNOCยท POLARISNOC Original

Unlock the full POLARISNOC hub

AI-powered SWQL generation, script management, CVE tracking, and verified solution intelligence.

Sign Up Free