Skip to main content

 

Goal: Replacement of SMTP messaging (DBMAIL) with webhooks

Is it possible to send an alert from SQL Server to PagerDuty without using CLR?

 

Hi ​@MadMax,

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:

  • You can set up a Rundeck job that is triggered by a SQL Server event (for example, via a scheduled check, a file drop, or a custom integration).
  • The Rundeck job can run a script (PowerShell, Python, Bash, etc.) that sends a webhook to PagerDuty using the Events API.
  • You can even have SQL Server Agent call Rundeck’s API to trigger a job when a specific alert condition is met.

Example workflow:

  1. SQL Server detects an alert condition.
  2. SQL Server Agent runs a command-line script or uses curl/Invoke-WebRequest to call the Rundeck API and trigger a specific job.
  3. The Rundeck job sends the PagerDuty webhook.

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!


Reply