Welcome, Guest Login

Support Center

Configuring Webhooks

Last Updated: Apr 22, 2015 10:34AM EDT
Please note:  Webhooks are available for Trial and Elite tier customers.

Webhooks in Stackdriver offer the ability to notify remote services about incidents that occur in your environment. There are eight parts to an incident notification. Below is an example of a message generated from an incident:
      "summary":"CPU (agent) for webserver-85 is above the threshold of 1% with a value of 28.5%",

Field output explanation:

  • incident_id - UUIDv4 according RFC 4122
  • resource_name: the name of the resource used through the application
  • ended_at : this will be null when it is an open message, and will have a timestamp for when the incident ended for resolved messages.
  • resource_id: AWS resource id
  • url: link to incident page
  • summary: condition name with the resource name and value
  • state: open, closed or acknowledged
  • started_at: timestamp for metric that triggered violation


To configure a Webhook, go to https://app.stackdriver.com/settings/notifications/static-webhook or navigate through Account >> Account Settings >> Notifications >> Webhooks. 


To add a simple Webhook, specify the endpoint where you would like an incident message to be posted, give it a name, test Stackdriver’s connection to the endpoint and then add it.

After creating your Webhook, you will be able to use it when configuring alerting policies. When creating a policy, under the Notifications section, select Webhook from the Add drop-down, choose your desired Webhook and then click the green check mark to confirm the addition.


In addition to basic message posting, Stackdriver Webhooks supports two methods of authentication. Basic Auth and Token Auth.

Basic Auth

Basic authentication leverages the HTTP specification for including username and password along with the webhook request Stackdriver sends. In accordance with the spec, Stackdriver expects your server to correctly return a 401 response with the correct “WWW-Authenticate” header.

Documentation and examples of HTTP Basic Auth can be found at:
- RFC Specification: http://www.ietf.org/rfc/rfc2617.txt
- Wikipedia: http://en.wikipedia.org/wiki/Basic_access_authentication

Token Auth

Token Authentication is utilized by providing a querystring parameter in the endpoint url with a key that the server expects to be secret between itself and Stackdriver. For example, you might enter an endpoint url that looks like: https://www.myserver.com/stackdriver-hook?auth_token=1234-abcd.

When Stackdriver posts an incident to that url, you can check to ensure that the attached parameter matches what you expect. This method of authentication is most effective when used in conjunction with SSL/TLS to encrypt the HTTP request preventing snoopers from learning the token.

For server examples in python, visit https://gist.github.com/tschieggm/7604940

seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found