Network Management
API Poller Alert does not have a relationship with Nodes in SolarWinds Platform
There is no direct relationship between the Orion.ApiPoller.ApiPoller table and Orion.Nodes table.
First published date
Last published date
Overview
When creating an alert based on API Poller, there is no direct relationship between the Orion.ApiPoller.ApiPoller table and Orion.Nodes table.
Because of that, the entities available in the Alert Actions are very limited. It is not possible to select Custom Properties or Nodes as example.
To overcome this limitation, as workaround, you can create an SWQL alert based on Nodes.
It is necessary to use LEFT JOIN to combine it to the APIPoller tables and CP tables (if using CP).
SELECT Nodes.Uri, Nodes.DisplayName FROM Orion.Nodes AS Nodes
LEFT JOIN
Orion.APIPoller.ApiPoller AS ApiPoller ON Nodes.NodeID = ApiPoller.RelatedEntityId
LEFT JOIN
Orion.APIPoller.ValueToMonitor as av ON ApiPoller.ID = av.Apipollerid
LEFT JOIN
Orion.NodesCustomProperties as ncp ON Nodes.NodeID = ncp.NodeID
WHERE
av.status in (1)
Product section
Cause
API Poller based alerts do not have a native relationship with the Orion.ApiPoller.ApiPoller and Orion.Nodes tables, which limits the fields available in Alert Actions.
Resolution
Because API Poller alerts do not have a direct relationship to Nodes, Node fields and Custom Properties cannot be referenced in Alert Actions by default.
To work around this limitation, you can manually pull the needed Node and Custom Property details using a SQL query inside the Alert Action (Email/Event). This approach allows the alert to return a single combined output that includes API Poller information and Node details, even though they are not natively linked.
Use the following query In Alert Actions (Event / Email):
${SQL: SELECT
CONCAT(
'Api ID: ', ap.ID,
'| Api Name: ', ap.Name,
'| Node ID: ', Nodes.NodeID,
'| Node Name: ', Nodes.Caption,
'| CP_NodeOwner: ', ncp.CP_NodeOwner,
'| CP_NodeTeamRep: ', ncp.CP_NodeTeamRep)
as Details
FROM
NodesData as Nodes
LEFT JOIN
APIPoller_ApiPoller AS ap ON Nodes.NodeID = ap.RelatedEntityId
LEFT JOIN
APIPoller_RequestDetails as r ON ap.ID = r.APIPollerID
LEFT JOIN
APIPoller_ValueToMonitor as av ON r.ID = av.RequestDetailsID
LEFT JOIN
NodesCustomProperties as ncp ON Nodes.NodeID = ncp.NodeID
WHERE
Nodes.NodeID = ${NodeID}}
|
Note:
|