General Purpose Webhook API Support with User Defined Headers and Payload
Provide alarm notification support for general purpose webhook API endpoints. Allow user defined HTTP methods, payloads, and headers. Support for custom headers to prevent server logs from storing authentication tokens. Provide an alarm data substitution mechanism to allow users to define static webhook notifications which can map predefined alarm data to the payload.
The general webhook mechanism shall provide similar behavior to cURL which is the command line tool and library for transferring data with URL.
User stories
: As an operator using Monasca to monitor my cloud solutions, I want to specify alarm notifications that automatically post messages to my operators using services like HipChat.
: As an operator using Monasca to monitor my cloud solutions, I want to specify alarm notifications that automatically create Gists from alarm data to a private or public endpoints to share snippets and pastes with others.
: As an operator using Monasca to monitor my cloud solutions, I want to specify alarm notifications that allow batched webhook notifications such that I could post a Gist and post the link to a chat room for operators to examine.
Applicable Webhook API's
* https:/
* https:/
Anatomy of a user defined webhook alarm notification
1) URL
2) Method
3) Headers
4) Payload
5) Alarm data to variable mapping e.g. substitution from key:value alarm data to webhook payload insertion
Example static alarm payload that can be included via substitution, or added as a complete JSON payload to the webhook payload.
* Specific key/value substitution
* Entire alarm JSON structure insertion
{
"alarm_
"severity": "LOW",
"id": "3174f224-
"links": [
{
}
],
"name": "Disk Inode Usage"
},
"alarm": {
"id": "1cbf6a9b-
"state": "UNDETERMINED",
"links": [
{
}
]
}
}
Prototype code:
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Dexter Fryar
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Drafting
- Series goal:
- None
- Implementation:
- Deferred
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Work Items
Work items:
Design the UI: TODO
Test the UI: TODO
Design the retry mechanism: TODO
Add notification support for general purpose webhooks: TODO
Test general purpose webhooks against HipChat and GitHub: TODO
Document the usage: TODO