• Products
  • Get started
  • Documentation
  • Resources

Integrate Opsgenie with Stackdriver

Stackdriver logo

Stackdriver's goal is to help Dev and Ops teams manage large, distributed applications running in the public cloud. It visualizes applications, systems, and infrastructure metrics. Also, Stackdriver provides a policy system to alert users when predefined thresholds are breached.

What does Opsgenie offer Stackdriver users?

Use Opsgenie’s Stackdriver Integration to forward Stackdriver incidents to Opsgenie, and Opsgenie alerts to Stackdriver. Opsgenie determines the right people to notify based on on-call schedules– notifies via email, text messages (SMS), phone calls, and iPhone & Android push notifications, and escalates alerts until the alert is acknowledged or closed.

Functionality of the integration

  • When you create an incident in Stackdriver, it creates an alert in Opsgenie.

  • When you acknowledge an incident in Stackdriver, the alert is acknowledged in Opsgenie.

  • When you close an incident in Stackdriver, the alert is closed in Opsgenie.

  • When you acknowledge an alert in Opsgenie, the incident is acknowledged in Stackdriver.

  • When you close an alert in Opsgenie, the incident is closed in Stackdriver.

Add Stackdriver Integration in Opsgenie

  1. Go to Settings → Integrations. Search for Stackdriver and select Add

Under the Free and Essentials plans, the tabs under the Team dashboard are limited to Main, Integrations, Members, and Activity Stream.

2. Specify who is notified of Stackdriver alerts using the Responders field. Autocomplete suggestions are provided as you type.

Did you know that you can also add this integration from your team dashboard? 

If you want your team to be the owner of this integration, add it from your team dashboard. Opsgenie will assign the alerts received through this integration to your team only.

To do that;

  1. Go to Teams,

  2. Find your team and select it to go to your team dashboard,

  3. From your team navigation, select Integrations,

  4. Select Add integration.

3. Copy the Webhook URL.

4. Click Save Integration.

Stackdriver Integration Settings

Configuration in Stackdriver

  1. In Stackdriver, go to Account Settings.

  2. Select Notifications on the left.

  3. Select the WEBHOOKS tab.

  4. Click + Add.

Stackdriver add webhook

5. Paste the integration API URL into "ENDPOINT URL".

6. Click Save.

Stackdriver add static webhook
Stackdriver Static Webhook

Advanced Configuration Settings in Opsgenie

Stackdriver Advanced Configuration
Stackdriver Alert Fields

Acknowledging and Closing Incidents in Stackdriver (Optional)

  • Set the integration to automatically acknowledge or close an incident in Stackdriver, when you acknowledge or close the alert in Opsgenie.

  • In order to do this, select the Send Alerts To Stackdriver option in integration settings.

  • After enabling this option, the "Stackdriver API Key" field appears.

  • In Stackdriver, click on the Username drop-down menu on the top right. Select Account Settings.

  • Select API Keys from the left menu.

  • Click on "+ Add" button.

  • Give the API Key a description and select API Admin Key as "Access Role".

  • Click Save.

  • Copy the newly created Stackdriver API Admin Key and paste it into the "Stackdriver API Key" field in Opsgenie.

Stackdriver settings

Sample payload sent from Stackdriver

JSON

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "incident": { "incident_id": "f2e08c333dc64cb09f75eaab355393bz", "resource_id": "i-4a266a2d", "resource_name": "webserver-85", "state": "open", "started_at": 1385085727, "ended_at": null, "policy_name": "Webserver Health", "condition_name": "CPU usage", "url": "https://app.stackdriver.com/incidents/f333dc64z", "summary": "CPU for webserver-85 is above the threshold of 1% with a value of 28.5%" }, "version": 1.1 }
Last modified on Aug 3, 2021
Cached at 8:05 PM on Oct 27, 2021 |

Additional Help