With deploying webhooks for velocloud edges, user might observe webhooks failing for several edges while generating the following error message within the events tab of the VECO:
Webhook with destination <webhook URL> returned error Error: Webhook payload template is not JSON-parseable
Configure webhook from the VECO's alert setting section as displayed from the following picture taken from internal none-production edge testbed.
Webooks will fail due to either link name, edge name (deviceName), and/or edge description (deviceDescription) having an invalid special character which causing Json parsing to fail.
The list of invalid special characters for webhooks are:
\
\b
\f
\n
\r
\t
Here is the Json that is called during webhook.
{
"alertTime": "{{alertTime}}",
"alertType": "{{alertType}}",
"customerLogicalId": "{{customerLogicalId}}",
"customer": "{{customer}}",
"deviceLogicalId": "{{deviceLogicalId}}",
"deviceDescription": "{{deviceDescription}}",
"deviceSerialNumber": "{{deviceSerialNumber}}",
"deviceName": "{{deviceName}}",
"lastContact": "{{lastContact}}",
"vco": "{{vco}}",
"message": "{{message}}",
"entityAffected": "{{entityAffected}}"
}
Remove the invalid special characters from link name, edge name (deviceName), and/or edge description (deviceDescription). once done the webhook call should no longer fail.
Engineering is working a VCO build that will allow compatibility for the special characters within webhook calls. This is being released on future VCO builds.