Webhook payload fails when using an array structure in VCF Operations 9.1
search cancel

Webhook payload fails when using an array structure in VCF Operations 9.1

book

Article ID: 451043

calendar_today

Updated On:

Products

VCF Operations

Issue/Introduction

In VCF Operations 9.1.x, alerts configured with webhook payload templates in an array format (e.g., [...]) may fail to populate variable values, transmitting literal variable names instead.
[
{
"labels": {
"alertname": "${ALERT_DEFINITION} - ${RESOURCE_NAME}",
"notify_sys": "######",
"notify_grp": "######",
"resolve": "false"
},
"annotations": {
"updateDate": "${UPDATE_TIME}",
"resourceId": "${RESOURCE_ID}",
"adapterKind": "${ADAPTER_KIND}",
"resourceKind": "${RESOURCE_KIND}",
"resourceName": "${RESOURCE_NAME}",
"Health": "${OBJECT_HEALTH_STATE}",
"Risk": "${OBJECT_RISK_STATE}",
"Efficiency": "${OBJECT_EFFICIENCY_STATE}",
"impact": "${ALERT_IMPACT}",
"criticality": "${ALERT_CRITICALITY}",
"type": "${ALERT_TYPE}",
"subType": "${ALERT_SUBTYPE}",
"alertId": "${ALERT_ID}",
"status": "${ALERT_STATUS}",
"recommendations": "${ALERT_RECOMMENDATIONS}",
"AriaAlertURL": "${LINK_TO_ALERT}"
},
"generatorURL": "${LINK_TO_ALERT}"
}
]

Environment

  • VCF Operations 9.1.x

Cause

In VCF Operations 9.0.2, the webhook plugin's JSON payload-building logic was restructured to parse the payload template as a JSON object before applying placeholder substitution. When the template's root element is a JSON array, this parsing step fails, and the plugin falls back to sending the original template without substituting variables.

Resolution

Broadcom is aware of this product behavior. This is expected to be resolved in a future release of VCF Operations 9.1.x.

Workaround (if upgrade is not immediately possible):
  1. Switch the webhook payload to an XML structure that preserves the array-like format, using nested elements under a root element (e.g., ${ALERT_DEFINITION}).
  2. Set the notification's Content-Type header to application/xml.
  3. Verify that the receiving endpoint can accept XML before proceeding.