Here's how to set up a webhook to receive Stackdriver alerts.
Once configured, you can:
Follow the steps below to integrate Stackdriver alerts with Transposit.
Go to Settings > Webhooks, and click Add webhook. Choose Stackdriver alerts, as shown below.
Note: The optional Slack channel must already exist, create it before adding the webhook.
Click Add and then find the webhook you just added in the list. Click Click to copy to copy the URL to the clipboard or manually copy the endpoint URL.
Follow the "Managing Notification Channels" section of the Stackdriver documenrtation and create a webhook, as shown below.
When you test the connection by clicking Test Connection, shown above, or when you create Stackdriver alerts, you should see events appearing in Transposit's Webhook events page, shown below, and, optionally, in Slack.
With Stackdriver alert webhooks set up, you can do the following in Transposit.
When a Stackdriver alert is triggered, you should see alerts displayed as events in Transposit, as shown below.
In Slack, if you defined the webhook in Transposit to support Slack, you should see Stackdriver alerts displayed, too, as shown below.
When an alert is received in Transposit or Slack via the Stackdriver alert webhook, click the Create activity button to create a new activity, add runbooks, and follow the progress of work done by your team in response to Stackdriver alerts.
If you have added runbook triggers based on Stackdriver alerts, your runbooks will start automatically when a Stackdriver alert is received, as shown below.
Alternatively, using the Conditions button, and choosing Custom output parameters, you can specify that your runbooks will start automatically when a Stackdriver alert is received with specific data in its payload, as shown below.
For example, you might want a runbook to be triggered based on the state of the incoming alert, as shown below.
Stackdriver customer output parameters you can refer to in your conditions are as shown below.
google_monitoring_condition_name
google_monitoring_started_at
google_monitoring_state
google_monitoring_url
google_monitoring_incident_id
incident
Alternatively, you can specify that the runbook should start only when an activity is created from the webhook, as shown below.
If you have defined dynamic Stackdriver alert parameters while adding runbook actions, as shown below, their values will be populated by the Stackdriver alert's payload when the actions are executed during runbook runs.
When you select the items above, parameters are generated, as shown below, between opening and closing double curly braces.
Trigger.Webhook.Stackdriver alerts.app_name
Trigger.Webhook.Stackdriver alerts.service
Trigger.Webhook.Stackdriver alerts.google_monitoring_condition_name
Trigger.Webhook.Stackdriver alerts.google_monitoring_started_at
Trigger.Webhook.Stackdriver alerts.google_monitoring_state
Trigger.Webhook.Stackdriver alerts.google_monitoring_url
Trigger.Webhook.Stackdriver alerts.google_monitoring_incident_id
Trigger.Webhook.Stackdriver alerts.incident