the below is throwing "MACRO SQL ERROR - Invalid object name 'Orion.Nodes'"${SQL: SELECT NodeID, IPAddress, Caption, NodeDescription, Description, DNS, Vendor, Location FROM Orion.Nodes}
I made it to work, it was a silly mistake, I use two SQL studios one in my local laptop and another is a actual database in the solarwinds server, I was using local database naming conventions, like Orion.Nodes but it actually is [dbo].[Nodes] ,
The above is SWQL, not SQL.
Change the beginning to ${SWQL: ...}
${SWQL: ...}
Now it won't run, it gives an error, I am doing this inside a webhook payload body
"NodeDetails": ${SWQL: SELECT NodeID, IPAddress, Caption, NodeDescription, Description, DNS, Vendor, Location FROM Orion.Nodes WHERE NodeID=${N=SwisEntity;M=NodeID}}
Failed to execute HTTP request
Oh! I thought this was in an Alert (because it's in the Alert Lab forum).
This is a webhook to another target, correct? I think there's an example of what would work in a Slack article.
I think the article won't answer my question, since swql queries are parsed before the post request sent to the webhook address.
I have tried all the combination of SWQL, like removing quotes or removing Orion from Orion,Nodes