codemonth.dk

One project every month - making stuff better ...

The power of combining API's (1+1 > 2)

Integrating plsql with different web applications, is extending the functionality of the database beyond just data management. But it is when we combine these API integrations, that we can really see the benefit of them. In this entry I will show how integrating just two different API's, we can create an easy monitoring solution, that can rival more expensive traditional choices.

What I will do, is I will combine the Airbrake API and the Pagerduty API, to not only track errors, but also implement a monitoring solution that can alert my DBA that something is wrong. I will show how we can use those API's to setup team based alerting and reporting on errors, and hint on how you could further imporve or extend the usage of this.

Paging dr. DBA

So I have been building an API in pl/sql for Airbrake, a web based service, where you can track your run-time errors. The only problem is, that you don't always sit at your computer with the Airbrake dashboard open. So what to do when there is a serious error and you want to get alerted, or there is something that goes wrong in a business process or a batch job?

Luckily there are several options available. One of them is pagerduty, and they have an api you can connect to as well. So I have created a small package that can connect to your pagerduty account, and trigger/acknowledge/resolve incidents. There are of course many more options in the api, such as creating Teams, Escalation policies and on-duty schedules, and I will be adding those options over the next 2 weeeks.