Zapier connects the web apps you use to easily move your data and automate tedious tasks.
The xMatters app in Zapier allows you to easily create notification events in xMatters when triggers are met in other apps. Similarly, you can also take actions on other apps when xMatters events are created, notifications are delivered or responses are submitted. Zapier supports over 300 web apps but as a basic example, we'll provide an example of how to create a Zap using a generic webhook as our trigger.
Create xMatters Events:
Let's imagine you want to use xMatters to send notifications to your on-call support group when your monitoring tool detects an application or server outage. Your monitoring tool supports webhooks and can make an HTTP POST when an event occurs. The monitoring tool sends event data as JSON but you cannot control the schema of the JSON payload and call the xMatters REST API directly.
Fortunately, we can use Zapier to solve this problem by creating a "Zap" that will execute the xMatters Create Event action when the Webhook Catch Hook trigger fires.
Zapier will provide a webhook URL that your monitoring tool can send its POST to.
Zapier will next ask for your xMatters hostname and user credentials.
When everything has been entered, Zapier will test your credentials and make sure it can access the xMatters REST API
If you want to add any filters to your incoming webhooks, you can do that next. For example, you could create a filter so that only monitoring events about certain applications or servers send out notifications.
Next comes the fun part, this is where we can map data being sent from your monitoring tool to xMatters properties in your communication plans.
The first thing we need to do is provide the Web Service URL of the form we will use to send our notification. You can obtain this URL in the xMatters communication plan design tools.
Next we need to tell Zapier which properties exist in your communication plan form. Suppose your form contains 3 properties. "Application", "Server" & "Issue".
Back in Zapier, we add these event properties to the Properties action field.
Finally, we can map data from the incoming webhook to these 3 event properties. Zapier will ask for a test post from your monitoring tool and then allow you to create the data mapping.
The next two fields are optional but if you want to override the event priority that is configured in the xMatters design tools you can. The xMatters design tools allow you to define message recipients in the form, but it you also want to override this and use the Zap to define the message recipients you can do that too.
Finally, we can test the Zap and confirm that a new event is created in xMatters.
That's it! Now every time your monitoring tools sends a webhook to Zapier you will get a new xMatters event with the event properties correctly populated.
If you have problems getting your Zap to work there are a few common things to check.
- Make sure your communication plan is enabled and your form is deployed as a webservice.
- Make sure the xMatters user you are using in Zapier has inititate event permissions on your communication plan form.
- Make sure the names of your event properties in your communcation plan form exactly match the values you added to the Properties action field in Zapier.
- Make sure you have defined your message recipients in either xMatters or Zapier. All xMatters events must have at least one targeted recipient.