How do we use AppNeta's Connector to send our Intelligent Alarms to a webhook?
search cancel

How do we use AppNeta's Connector to send our Intelligent Alarms to a webhook?

book

Article ID: 452329

calendar_today

Updated On:

Products

AppNeta

Issue/Introduction

AppNeta's API allows the configuration of targets to send its Intelleigent Alarm events, allowing administrators to route real-time alert notifications (ALARM_RAISED and ALARM_CLEARED) to third-party endpoints such as webhooks and custom API listeners.

Configuring a global notification endpoint requires submitting a correctly structured JSON object to the /v4/alarm/notification REST endpoint. 

The instructions below provide a basic guideline to perform this.

 

Resolution

Create the Global Webhook Notification Endpoint
  1. Log in to the AppNeta Web UI.

  2. Navigate to Gear Icon in the top right > Explore API to open the interactive Swagger UI.

  3. Ensure you're looking in the /V4/ section.  Locate and expand the Connectors resource section:

  4. Select POST /v4/alarm/notification.

  5. Click Try it out.

  6. In the Request body field, paste the following JSON payload (update the url property to match the target endpoint).  



    Note - if you do not know your Organization ID, run a GET /4/organization to receive your 5 digit OrgID:

  7.  Paste in the required syntax here, depending on your required settings:

     
    For a basic configuration, you  use the following example, simply update the URL:
    {
      "name": "Global Webhook Notification",
      "description": "Send all alarms to target webhook endpoint",
      "enabled": true,
      "notifyOn": [
        "ALARM_RAISED",
        "ALARM_CLEARED"
      ],
      "connectors": [
        {
          "type": "WEBHOOK",
          "url": "https://<insert your webhook url here>",
          "method": "POST",
          "headers": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      ]
    }

     

  8.   Execute the settings, then verify that the API returns an HTTP 200 or HTTP 201 response code.  Copy the returned id value for future configuration management.

  9.   As needed, you can verify the settings by running a GET on the endpoint.

Additional Information

 

You can force a test alarm to verify the Webhook Delivery.  To confirm that the target webhook endpoint successfully receives and processes events, create a temporary alarm by adjusting threshold limits:

  1. In the AppNeta Web UI, navigate to Alarms > Alarm Rules.

  2. Locate an active rule (or click Add Alarm Rule to create a dedicated test rule) and click Edit.

  3. In the Threshold Rules section, set the threshold to a severity of Critical and adjust the criteria to force an immediate violation, as seen in screenshot below:

    • Set Data Loss to 0%

      or

    • Set Round-Trip Latency to 1 ms

    • Adjust the occurance to 1 and window size 2 to increase the rate of the alarm and avoid waiting:

  4. Click Save.

  5. Wait 1 to 3 minutes for AppNeta to execute its next evaluation cycle.

  6. Check the receiving webhook dashboard and confirm alarms are arriving.

  7. Remove or adjust the custom alarm as needed.