Does anyone has an explanation about how to use SWQL/SQL query on creating alerts?
i want to create a node alert by SQL/SWQL querys.
is it possible?
Have you tried changing the 'I want to alert on:' field to SQL or SWQL query? You should be able to run your query from that point.
Below is an example. You can not change the Select statement so that stays as is.
"SELECT Nodes.Uri, Nodes.DisplayName FROM Orion.Nodes AS Nodes --this is already filled in on the top of the alert"
The Inner Join is connecting the Custom Properties Tables to the Orion.Nodes table
The Where Clause is selecting specifically what I want to alert on.
In this case I set the alert up to look for a condition where the nodes is Up (Status = 1) and Caption contained the word 'Servers' and the Group contained he word 'Windows Servers' and the Notification was left blank
You can change the Where clause to meet any condition you need.
INNER JOIN Orion.NodesCustomProperties AS cpa ON cpa.NodeID = Nodes.NodeID --this joins the Orion.Nodes table to the NodesCustomProperties table WHERE Status = '1' AND Caption LIKE '%Servers%' AND Group Like '%WindowsServers%' AND Notification IS NULL --This is where you can chose what to alert on such as status