I have a monitoring template with a powershell component monitor. The component monitor is outputting valuable information to two script outputs.
The first script output is human readable, the second script output is similar information, but in JSON format.
I've created a component alert that will fire when this component has a problem on any server (component status is Critical, which is easy to setup).
Once the alert fires, I'm trying to POST the second script output to a URL and I can't quite figure out how to get access to the second script output (the Unique ID is "AlertsJson" (without quotes).
I'm not super sure how to figure out the SWQL. I did find this, but I'm not sure if this is right nor am I sure if the WHERE clause is correct
${N=SWQL;M=SELECT c.MultipleStatisticData.StringData
FROM Orion.APM.Component c
where componentid = ${N=SwisEntity;M=ComponentAlert.ComponentID}
and c.MultipleStatisticData.Name like '%AlertsJson%'}The reason I'm not sure the WHERE clause is correct is because of the "ComponentID". What is ComponentAlert.ComponentID? (Since my alert is a component alert, perhaps ComponentAlert.ComponentID is the exact ID of the component monitor that has been applied to the node? And Orion.APM.Component has a list of all components that have been applied to nodes (via monitoring templates)?
And perhaps the above SWQL is the right query?
Where would I run a SWQL query to verify? (I have direct solarwinds database access (read only), but I don't know where I can validate a SWQL query?)
Thank you~!