I would like to find a SWQL query for the Node Details view that will show the switch and port that a node is connected to. Does anyone have such a thing?
Hi patriot,
I have 2 options for you, but these are made with some assumptions of your environment.
If these assumptions are correct, then you can use this SWQL query in a classic widget to show CDP neighbors.
SELECT n.CiscoCdp.Interfaces.InterfaceName as [Local Interface] ,n.CiscoCdp.Interfaces.InterfaceAlias as [Local Interface Name] ,n.CiscoCdp.RemoteDevice as [Remote EndPoint] ,n.CiscoCdp.RemotePort as [Remote Port] ,n.CiscoCdp.RemoteIPAddress as [Remote IP] ,TOSTRING(TOLOCAL(n.CiscoCdp.LastDiscovery)) as [Discovery by SolarWinds] FROM NCM.Nodes n where n.CoreNodeID =${nodeid} WITH NOLOCK
This is what my widget looks like on my classic Node Details page.
To cover all of my bases, I added a LLDP neighbor directly under CDP widget. There's the SWQL query for the LLDP widget.
SELECT n.DisplayName as [Local Name] ,n.MachineType as [Local Machine Type] ,n.Interfaces.IfName as [Local Interface] ,n.Interfaces.Alias as [Local Interface Name] ,l.RemoteIpAddress as [Remote IP] ,l.RemotePortDescription as [Remote Interface] ,l.RemoteSystemName as [Remote LLDP Name] From Orion.Nodes n join Orion.NodeLldpEntry l on n.NodeID = l.NodeID WHERE 1=1 AND n.NodeID=${nodeid} and n.Interfaces.Index = l.LocalPortNumber
Hopefully one of these will work for you.
You can customize your “Alert me when a new MAC appears on the network” notification by using dynamic variables in your alerting tool or script to capture key details such as the MAC address of the new device, host name, connected host, and interface information. For example, in platforms like SolarWinds or PRTG, you can include placeholders like ${MACAddress}, ${DeviceName}, and ${Interface} in your trigger action to automatically display these values in alert messages or emails. This setup allows administrators to quickly identify new devices and their connection points. Think of it like checking the tnreginet official website, where you get consistent information across all stores—here, you ensure standardized, clear, and automatic data delivery across all alerts.