WHERE DO I START?
You are here:... (Miscellaneous) > Notifications > Webhook

Webhook

Add a Webhook notification

  1. Type a name for the webhook notification.
  2. Ensure the Enabled checkbox is selected.
  3. For URL, copy and paste the webhook's payload URL that should receive notifications.
  4. If the URL you provided requires basic authentication, type the username and password.
  5. Optionally, add one or more headers (key-value pairs) to the webhook notification.
  6. Optionally, select Custom from the Payload drop-down menu. A text field will open after selecting Custom. Create a custom JSON payload in the textbox. You can use the following variables to make your notification more dynamic. To test your template, go here or visit the GitHub page.
    VariableDescription
    ${eventCategory.name}

    The event category ( (Info), (Warning), or (Critical)).

    ${elementFqn}The Fully Qualified Name (FQN) of the element.
    ${elementId}The type of element (e.g., SERVER, ELB, EC2, RDS, etc.).
    ${elementLocation}The location of the element.
    ${elementName}The friendly name for the element.
    ${policyId}The policy identification number.
    ${policyName}The name of the policy.
    ${eventTimestamp}The time (in UTC) the event occurred.
    ${policyDescription}The description of the policy that generated the event.
    Example(s)   Below is the default payload used in the PagerDuty integration, but it's a good example of a custom JSON payload. You can modify this and use it as a custom Webhook if you desire.
    {
      "service_key": <your service key here from pager duty>",
      "incident_key": "${policyName} ",
      "event_type": "trigger",
      "description": "${category}: ${elementFqn} : ${policyName}",
      "client": "Netuitive Cloud Service",
      "client_url": "https://app.netuitive.com",
      "details": {
        "category": "${category}",
        "elementFqn":"${elementFqn}",
        "elementType": "${elementType}"
      },
      "contexts": [{
        "type": "link",
        "href": "https://app.netuitive.com/#/element/${elementId}/events"
      }]
    }
  7. Click Test to test the webhook.
    Important   The endpoint URL must return an HTTP code 200 to pass the validation.
  8. Click Save.