I am monitoring my node using SolarWinds Orion NPM (network performance monitoring). And I am using Orion SDK for getting alert information from SWIS (SolarWinds informarion Service) into vb.net console application.
I am using some vb.net code:
Function GetOneAlert(ByVal swis As InformationServiceClient) As AlertInfo
Dim query As String, result As XElement
query = "SELECT TOP 1 A.AlertDefID, A.ActiveObject, A.ObjectType FROM Orion.AlertStatus A WHERE A.Acknowledged=0 ORDER BY A.TriggerTimeStamp DESC"
result = swis.QueryXml(query)
The problem is, I want to get alertinforamtion
from three tables named Orion.AlertDefinitions
, Orion.AlertStatus
andOrion.Nodes
in swis
(SolarWinds Information Service) and I need to join these 3 tables but I can able to join 2 of them (Orion.AlertDefinitions
, Orion.AlertStatus
) using swql
(SolarWinds Query Language) query shown below
query = "SELECT AlertStatus.AlertDefID, AlertDefinitions.AlertDefID, AlertDefinitions.Name, AlertStatus.State, AlertStatus.ObjectName,
AlertStatus.TriggerTimeStamp, AlertDefinitions.Description FROM Orion.AlertStatus INNER JOIN Orion.AlertDefinitions
ON AlertStatus.AlertDefID=AlertDefinitions.AlertDefID WHERE AlertStatus.Acknowledged=0"
I know the alert details but i don't know the alert belongs to which node. For this purpose i need to join "orion.node" table with the remaining tables. But 3rd table (Orion.Nodes
) has no common field(s) in anyone of other two tables to join.
I need to get three field values named as DNS
, IPAddress
, NodeDescription
from Orion.Nodes
table.