Do other tasks than send email on new alert
It would be nice if it was possible to allow other tasks when a alert is raised. Other tasks which could be called: Script file, url, exe file.
-
Armand Bernard commented
Hello all, SQL Monitor dev here.
We now (13.0.30 onward) have a feature to run powershell scripts as responses to alerts! See this documentation for more information:
-
Hi Asaf,
You can use webhooks to send notifications to an external URL and an external service listening at that could take appropriate action. The two things to
look at are:-Setting up Webhook notifications (https://documentation.red-gate.com/sm/metrics-alerts-and-notifications/configuring-alert-notifications/setting-up-webhook-notifications)
- Custom Webhook messages (https://documentation.red-gate.com/sm/metrics-alerts-and-notifications/configuring-alert-notifications/setting-up-webhook-notifications/custom-webhook-messages)
As far as why we don't take other actions (apart from sending an email or Webhook message), there is one big consideration: Although SQL Monitor usually gets configured to use a highly privileged account, we ty to keep SQL Monitor as close as possible to read-only. As an example, custom metric queries are automatically rolled back so they can't modify a monitored system. Webhooks provide the ability to take custom actions and also give you the flexibility to take care those actions in the way that makes sense for your environment.
-
Asaf commented
Hi,
Any update with this request -
Any planning?
Any workaround?Thanks
-
Timothy commented
Pretty sure this is the similar to:
5 votes
and
16 votes
and
28 votes
adding them together this topic should be 117 votes by now :(
-
Timothy commented
this has become a major pain area for us. We would renew/buy more sql monitor licenses in a heartbeat if alert response/actions. Quest Spotlight, SentryOne, Solarwinds and apparently Apex are all offering this capability. It's actually the driving factor for us moving away from SQL Monitor which is a bummer because I quite like everything else :/
There is another item with 8 votes for this same thing at:
-
Timothy commented
this is something we've asked about for a few years now (through customer service and support).
will redgate sql monitor ever get alert response/actions like other monitoring softwares such as sentryone, solarwinds and spotlight? example, a drive is running dangerously low on space, alert goes out at 2AM, depending on the system, it may be a candidate for an automatic log shrink. another example is say a certain login is running more than 20 queries at a time, a custom alert to disable the login and notify support.
the lack of this feature has driven us to look at the above other softwares for monitoring :( which kind of sucks because the sql monitor interface has been nice thus far.
At least execution of TSQL and PowerShell
-
Anonymous commented
I'd like to see the ability to enable/disable SNMP traps on a per-alert basis rather than globally.
-
steve commented
It would be great if you could perform and action when an alert is triggered. For example if a service down alert is triggered maybe run some PowerShell code that could start the service.
I have noticed that some of the competitors now offer this e.g. APEX SQL Monitor:- https://knowledgebase.apexsql.com/use-custom-command-alert-actions-apexsql-monitor/
-
Hi Alex,
Thanks for your comment. Our thoughts in this area have evolved and we can see there are a number of scenarios where it would be useful for alerts to trigger an additional action, and where potential risks are nevertheless manageable.
If you'd be willing to help us understand a bit more about the kind of things you might be trying to achieve, please drop an email to sqlmonitorfeedback@red-gate.com and we'll get back to you to discuss it further.
-
Alex Riggs commented
Daniel,
I agree with your concern - but maybe we actually need that script ran to be able to do things like report to another system, or some type of advanced scripted email reporting.
-
Kasper Guldbrand commented
When sending out the alert notification on email it would be nice to have some additional data from a SELECT attached to this notification.
In my concrete example I have an alert on a metric calculating the percentage of used space on the log files. If above 80 it raises an alert. To this alert I would like to SELECT the active transactions exactly when the alert is detected so it is possible to see if any long running transactions are filling up the log.
I think it could be useful in many cases to provide the email with extra information and with "live" data.
I know I can just set up an alert executing a job on SQL Server. I just think it would be nice to have as an integrated part of the SQL Monitor tool.
-
Hi Fabricio,
Thanks for explaining further as to how you'd like to use this capability. FYI, we do have an integration with a 3rd party (paid-for) service called PagerDuty, which can turn SQL Monitor alerts into text messages. There's more information on their website at:
http://www.pagerduty.com/docs/guides/red-gate-sql-monitor-integration-guide/Best regards,
Colin.
-
Fabricio Lima commented
Hi,
Today we use some procedures that monitor some SQL Server things and send text message if we have a critical problem. We buy the SQL monitor and we still have to monitor some problems by "sql jobs" because i can't send text message in sql monitor. If I can call a procedure I will can send a text message.
Thanks...
-
James Chorlton commented
Also a feature that I would like to see; mostly because I can use it to insert into our SMS queue (the sms integration that SM allows isn't very helpful if you live outside the US/Canada!).
-
Thanks for your suggestion Tim
-
SQL4GNT commented
Example: User dbdev1 has a long running query...cause he always runs crazy selects in production for reports...the alert is fired, we are notified, and with this new feature we can use the information included in the alert to kill the process through tsql?
if user=@userId
Query Duration > threshold
kill @Process ID -
Thanks a lot Kenney for your feedback.
Regards,
Priya -
Hello Frank .. Thanks a lot for your suggestion.
-
Frank commented
I've used WildMetrix before and one the things I really liked was the ability to use canned or create scripts that I would excecute to return the server back to health in seconds.