Just a note, not really a question just information for others should they get alerts that are not getting cleared right when using Custom SQL alerts.
I made a customer SQL alert and a custom reset SQL alert. It seems like I ran across an issue where the comments were causing a syntax issue. I tested the code many times and it works fine in SQL Server Management Studio. Anyway the resets would never get triggered due to a syntax error.
The error was recorded in: C:\ProgramData\Solarwinds\Logs\Orion\AlertService.log
2015-03-05 09:35:17,175 [AlertCheckingThread] WARN Error - Error in UpdateRowsThatAreReset() -
System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near ')'.
The only change I had to make was convert each single line -- comment into a /* */ comment. FUBAR. I reported this to support and well they didn't really want to do anything else on this issue. The same comments had no issue on the trigger, just on the reset. I changed them all anyway and now we are good. I suspect it's an issue with line breaks or UTF conversions. All I know is that the code works fine exactly as written in the SSMS.
Good luck with your alerts.