GoAlert webhook connection validation fails with "Failed to post the server" in Aria Operations
search cancel

GoAlert webhook connection validation fails with "Failed to post the server" in Aria Operations

book

Article ID: 440912

calendar_today

Updated On:

Products

VCF Operations

Issue/Introduction

When attempting to configure and validate a GoAlert webhook connection in VMware Aria Operations, the validation fails. One or more of the following symptoms may be observed:

  • The Aria Operations UI displays the error: "Test was not successful: Failed to post the server."

  • Testing the connection directly from the "Aria Operations > Operations > Configurations > Outbound Settings" UI results in "400 Bad Request" HTTP error.

  • Testing via the "Aria Operations > Operations > Configurations > Notifications" returns "404 Not Found" or "400 Bad Request" error, depending on the specific template configuration.

  • Manually testing the endpoint using the following curl command syntax may be executed to verify payload and header requirements outside of Aria Operations CLI:

    • curl -v -k -X POST https://<webhook-endpoint-url> \
        -H "Authorization: Bearer <your_token>" \
        -H "Content-Type: application/json" \
        -d '{
              "title": "Test Alert from Aria Operations",
              "message": "This is a test notification to validate webhook connectivity.",
              "severity": "critical",
              "source": "Aria Operations",
              "details": {
                      "alertId": "12345",
                      "status": "active"
              }
      }'

Cause

These connection validation failures are the result of a combination of UI testing behavior and misconfigured Payload Templates.

  • UI Limitation (Header Omission): The standard Test button located on the Outbound Settings page executes a basic connection test without including the payload-specific custom headers (such as Content-Type: application/json or authorization tokens) required by the GoAlert API. This omission triggers a 400 Bad Request from the destination server.

  • Malformed URL (Double Pathing): If the Endpoint URI field within the Payload Template is populated with a full URL, Aria Operations appends that string directly to the Base URL defined in Outbound Settings. This results in an invalid, concatenated path (e.g., https://<goalert-host>/api/v2/https://<goalert-host>/...), which causes the destination server to return a "404 Not Found".

  • Missing Mandatory JSON Fields: The Test Notification feature in the Payload Template tests the New, Updated, and Cancelled alert states simultaneously. If the JSON payload is only customized for a "New Alert," the default, unedited JSON sent for the Updated and Cancelled states will lack the mandatory fields required by GoAlert. Consequently, the GoAlert server rejects those specific payloads, returning a "400 Bad Request".

Resolution

To successfully validate and configure the GoAlert webhook, bypass the standard Outbound Settings test and configure the Payload Template to use a uniform, blank-URI configuration.

  1. Skip the Outbound Settings Test Button: Do not use the Test button on the main Outbound Settings page, as it will always fail if the destination webhook server requires specific custom headers or payload structures.

  2. Clear the Endpoint URI: Navigate to "Aria Operations > Operations > Configurations > Payload Templates". Edit the GoAlert payload template and leave the Endpoint URI field completely blank. This ensures Aria Operations only uses the correctly formatted Base URL established in the Outbound Settings.

  3. Standardize Alert Payloads: While editing the Payload Template, locate the setting: "Do you want different payload details for new, updated, and canceled alerts?"

    • Set this option to "No".

    • Note: This setting forces Aria Operations to use the customized JSON payload for all alert states (New, Updated, and Cancelled). Because this single payload includes all required fields, it stops the connection test from failing.

  4. Validate via Payload Template: Use the "Test Notification" feature located inside the Payload Template workspace to validate the end-to-end connection.

Testing from the template rather than the Outbound Settings ensures all necessary headers and customized JSON payloads are correctly passed to GoAlert, resulting in a successful HTTP 200 response.