Run a custom SQL script when an alert is raised
We use SQL monitor very heavily for our SQL and application monitoring, what we would like is for each alert to be able to define a custom sql script to run when the alert is raised, the output of this sql should be included in the alert.
This would allow us to do things like capture whoisactive when blocking occurs or other application specific things and make responding to alerts MUCH easier.
-
Greg Smulko (Redgate) commented
Hi @mark-freeman,
It's possible to run a PowerShell script as an alert response starting from Monitor ver. 13.0.31 released October 4, 2023 - please see https://www.red-gate.com/monitor14/script-notifications
From within the PowerShell script, a custom T-SQL can be run as well.
-
Mark Freeman commented
Some situations would be easy to fix by running a script, either in PowerShell or TSQL. Letting us automate fixes would help bring the alerting up to what SentryOne has offered for years.
-
Carlos commented
The ability to trigger a response would be next level. It would allow for some automation of response.
-
Anonymous commented
It is still a great idea.
-
Anonymous commented
This is a much needed feature! SNMP traps are horrible and require another monitoring system, running a script it would allow you to integrate with any rest api or database
-
alexsdba commented
This would be a great feature.
-
Claudio Mendes commented
Great Idea! sadly I doesn't have any votes left so sorry for not upvoting.