Alerts sent from Site24x7 to a webhook fail with a 400 error and are marked as duplicate events by the third-party system.
Common cause
This issue is likely caused by a possible misconfiguration in the Update URL and Close URL settings of the custom ticketing webhook:
- Missing ticket identifier:
The [TICKET_ID] placeholder is not included at the end of the Update and Close URLs.
Without this, the system cannot identify which ticket to update or close, leading to the creation of a new ticket instead.
- Incorrect HTTP methods:
- Update and close operations are often configured to use POST.
- Standard practice typically requires PATCH or PUT for updating existing tickets and PUT/PATCH for closing tickets, depending on the third-party API specification.
- Using the same parameters:
- The system might use the same parameters for both update and close operations, leading to conflicts or duplicate ticket creation.
Root cause (RCA)
In custom ticketing integrations:
- When a monitor status changes to UP, the standard workflow is:
- Update the existing ticket with the latest details.
- Close the existing ticket.
- If the webhook URLs do not include [TICKET_ID] or use the wrong HTTP method:
- The system creates new tickets instead of updating or closing existing ones.
- Subsequent operations detect that the parameters that are sent from Site24x7, such as incident_time, already exist, causing a duplicate event error.
This behavior affects both MSP users and standard Site24x7 users.
Solution
To prevent duplicate ticket creation and ensure proper ticket life cycle management:
- Log in to Site24x7.
- Navigate to Admin >Third-Party Integrations and choose your existing integration on the webhook that generates duplicate tickets.
- In the Manage Tickets Configuration section, under the Update Request and Close Request sections, include [TICKET_ID].
Append $TICKET_ID to the end of the Hook URL.
Example:
Update Hook URL: https://example.com/api/rest/$TICKET_ID/notes
Close Hook URL: https://example.com/api/rest/$TICKET_ID/notes
- Choose the correct HTTP methods as shown below:
- Update: PATCH or PUT (depending on the API)
- Close: PUT or PATCH (depending on the API)
- Choose Custom Parameters if needed.
- Avoid using the same incident parameters for both Update and Close URLs.
- Configure custom parameters to differentiate operations and prevent conflicts.
- Test the workflow: After updating the URLs and methods, test the entire life cycle (alert > update > close) to confirm proper behavior.
Conclusion
Duplicate tickets typically occur due to a missing [TICKET_ID] in webhook URLs and incorrect HTTP methods. Correcting the URLs, using proper HTTP methods, and customizing parameters ensures seamless ticket updates and closures without generating duplicates.