Custom Webhook Notification Payloads?

1,218 views
Skip to first unread message

Joshua Biggley

unread,
Apr 26, 2018, 12:23:22 PM4/26/18
to Google Stackdriver Discussion Forum
Is it possible to customize the payload of a webhook notification for both the incident creation and resolution?  We're trying to route these events into our event management platform and then on to our incident management platform, but we need to pass some specific key:value pairs to make that work.

The current payload (as per the sample message on the Webhook configuration page). I don't see any way to adjust the payload by adding additional key:value pairs.

{
  "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.google.stackdriver.com/incidents/f333dc64z",
    "summary": "CPU for webserver-85 is above the threshold of 1% with a value of 28.5%"
  },
  "version": 1.1
}

Amir Hermelin

unread,
Apr 26, 2018, 12:26:14 PM4/26/18
to joshua....@cardinalhealth.com, Google Stackdriver Discussion Forum
Hi Joshua,
please make sure to read our GCP blog post for tomorrow morning's announcement...

--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.
To post to this group, send email to google-stackdr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/7915cc7e-2459-4a01-a069-18f7b524ab71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--


Amir Hermelin

am...@google.com

Product Manager, Google Cloud


Message has been deleted

Chris McDevitt

unread,
May 20, 2018, 6:20:17 PM5/20/18
to Google Stackdriver Discussion Forum
Hi,

I was wondering the same thing. I need to modify the JSON payload for the webhook for Notifications. I can't seem to find the blog post or docs on how to do this. Can someone please link to the information here?

Thanks in advance for your help...


On Thursday, April 26, 2018 at 12:26:14 PM UTC-4, Amir Hermelin wrote:
Hi Joshua,
please make sure to read our GCP blog post for tomorrow morning's announcement...

On Thu, Apr 26, 2018 at 9:23 AM Joshua Biggley <joshua....@cardinalhealth.com> wrote:
Is it possible to customize the payload of a webhook notification for both the incident creation and resolution?  We're trying to route these events into our event management platform and then on to our incident management platform, but we need to pass some specific key:value pairs to make that work.

The current payload (as per the sample message on the Webhook configuration page). I don't see any way to adjust the payload by adding additional key:value pairs.

{
  "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.google.stackdriver.com/incidents/f333dc64z",
    "summary": "CPU for webserver-85 is above the threshold of 1% with a value of 28.5%"
  },
  "version": 1.1
}

--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdriver-discu...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.

---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-discussion+unsub...@googlegroups.com.

Amir Hermelin

unread,
May 20, 2018, 6:31:56 PM5/20/18
to cmcd...@gmail.com, Google Stackdriver Discussion Forum
Hi Chris,
please Google "stackdriver variable substitutions" the first link should be the blog post. You can also search the Stackdriver documentation in the alerting section, variable substitutions are described there.
Thanks,
Amir.

Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.

---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.


--


Amir Hermelin

am...@google.com

Product Manager, Google Cloud


--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.

---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.

To post to this group, send email to google-stackdr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael Safyan

unread,
May 22, 2018, 1:24:59 AM5/22/18
to Amir Hermelin, cmcd...@gmail.com, Google Stackdriver Discussion Forum
Just to follow-up here.... there is currently no way to fully customize the payload of the Stackdriver webhook notifications (sorry for raising expectations). It is, however, possible to do some customization of the content of the "documentation". For the use case of passing along some additional configuration, it may be possible to do so by putting this data into the body of the "documentation" section (which the handler receiving the webhook could then parse).

Reply all
Reply to author
Forward
0 new messages