Hello,
We are using SAM to monitor some custom stuff using powershell scripts. However, we are struggling to extract the messages thrown by the scripts. We are forwarding them to SAM using Write-Host "Message.Warning" and Write-Host "Message.Critical:".
The only way we figured out for extracting these messages and use them in the alerts is using custom SQL query. We look in the database table APM_ComponentAlertVariable using the powershell componentid as a filter. But this is not a good solution for us, since if we recreate the component for some reason, we have to change the SQL query.