Goal: Replacement of SMTP messaging (DBMAIL) with webhooks
Is it possible to send an alert from SQL Server to PagerDuty without using CLR?
Goal: Replacement of SMTP messaging (DBMAIL) with webhooks
Is it possible to send an alert from SQL Server to PagerDuty without using CLR?
Hi
I think you can use Rundeck to accomplish this at scale, or just use SQL Server Agent w/ an external script if your setup is simple and not resource intensive.
How it works with Rundeck:
Example workflow:
curl
/Invoke-WebRequest
to call the Rundeck API and trigger a specific job.I've added links to docs above so you can have an easier time figuring out. Please let me know if it works and have a nice day!
Hi @lupimiquel
Thanks for your response.
I am trying to pass a sql command’s results into the @html_details part of the payload as shown below.
Please send an example of the code required in sql as a select command which will pass into the @html_details field of this payload which then is sent to pagerduty:
"routing_key": "' + @routing_key + '",
"event_action": "' + @event_action + '",
"dedup_key": "' + @dedup_key + '",
"payload": {
"summary": "' + @summary + '",
"source": "' + @source + '",
"severity": "' + @severity + '",
"custom_details": {
"HTML": "' + @html_details + '"
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.