Edge Delta Webhook Output

Send data to a webhook.

Overview

The Webhook Output node sends triggered signals to a webhook.

Example Configuration

nodes:
  - name: webhook_node
    type: webhook_output
    endpoint: "https://api.pagerduty.com/incidents"
    headers:
      Content-Type: "application/json"
    payload: |
      {
        "incident": {
          "type": "incident",
          "title": "{{ .item._ed.tag }} {{ .item._ed.host}} Disk usage at 85%",
          "service": {
            "id": "<ID of the pagerduty service which can be fetched via services rest API>",
            "type": "service_reference"
          },
          "body": {
            "type": "incident_body",
            "details": "A disk is getting full on this machine. You should investigate what is causing the disk to fill, and ensure that there is an automated process in place for ensuring data is rotated (eg. logs should have logrotate around them). If data is expected to stay on this disk forever, you should start planning to scale up to a larger disk."
          }
        }
      }      

Required Parameters

name

A descriptive name for the node. This is the name that will appear in Visual Pipelines and you can reference this node in the yaml using the name. It must be unique across all nodes. It is a yaml list element so it begins with a - and a space followed by the string. It is a required parameter for all nodes.

nodes:
  - name: <node name>
    type: <node type>

type: webhook_output

The type parameter specifies the type of node being configured. It is specified as a string from a closed list of node types. It is a required parameter.

nodes:
  - name: <node name>
    type: <node type>

endpoint

The endpoint parameter defines the webhook URL. It is specified as a string and is required. You may need to define egress permissions for your chosen endpoint.

nodes:
  - name: <node name>
    type: webhook_output
    endpoint: "<end point address>"
    payload: | 
      <message template>

payload

The payload parameter defines the message template. It is specified in JSON and is required.

nodes:
  - name: <node name>
    type: webhook_output
    endpoint: "<end point address>"
    payload: | 
      <message JSON>

Optional Parameters

headers

The headers parameter defines a set of key-value pairs for the request headers. For example Content-Type: "application/json".It is specified as a yaml.MapSlice and is optional.

nodes:
  - name: <node name>
    type: webhook_output
    endpoint: "<end point address>"
    headers:
      <key>: "<value>"
    payload: | 
      <message JSON>