https://github.com/cloudforet-io/plugin-api-direct-mon-webhook
https://github.com/cloudforet-io/plugin-api-direct-mon-webhook
monitoring plugin webhook
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/cloudforet-io/plugin-api-direct-mon-webhook
- Owner: cloudforet-io
- License: apache-2.0
- Created: 2022-09-05T01:11:05.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-21T16:36:50.000Z (about 2 years ago)
- Last Synced: 2024-03-21T17:48:15.143Z (about 2 years ago)
- Topics: monitoring, plugin, webhook
- Language: Python
- Homepage:
- Size: 74.2 KB
- Stars: 4
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Webhook plugin for SpaceONE
> SpaceONE's [plugin-api-direct-mon-webhook](https://github.com/spaceone-dev/plugin-api-direct-mon-webhook)
is a tool that can integrate and manage events of from 3rd-party system.
> SpaceONE already supports various external monitoring ecosystems in the form of plug-ins
> If you want to integrate SpaceONE with the monitoring system you are operated, deliver the events to this plugin webhook.
Find us also at [Dockerhub](https://hub.docker.com/repository/docker/spaceone/plugin-api-direct-mon-webhook)
> Latest stable version : 1.2.5
Please contact us if you need any further information. (support@spaceone.dev)
---
## Body of the request
```json
{
"options": {},
"data": {
"event_key": "xa339sa9b09sd94jgx1234vlkajdflk",
"event_type": "ALERT",
"title": "This is test event",
"description": "This is Sample Event. It's sample description.",
"severity": "ERROR",
"rule": "this is event rule",
"image_url": "https://sample.io/img/sdfsdf",
"provider": "aws",
"account": "aws-account-id",
"resource": {
"resource_id": "resource-xzasdfasdf",
"resource_type": "server",
"name": "resource_name"
},
"additional_info": {
"asdlkafjsdlkf": "asdfasdf"
},
"occurred_at": "datetime"
}
}
```
| **Parameter** | **Description** | **Examples** |
|--------------------------| -------------------- | ------------- |
| `event_key` | event unique key | |
| `event_type` | Type of event. | `RECOVERY`, `ALERT`, `ERROR` |
| `title` | Title of event | |
| `description` | Description of event | |
| `severity` | Severity of event | `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `NOT_AVAILABLE` |
| `rule` | Rule in which the event was triggered | |
| `image_url` | URL include the image associated with the event | |
| `provider` | Provider of the resource which the event was generated | |
| `account` | Account ID of the resource which the event was generated| |
| `resource.resource_id` | ID of the resource which the event was generated | |
| `resource.resource_type` | The type of the resource which the event was generated | |
| `resource.name` | Name of resource | |
| `additional_info` | Additional information about the event. It is a dictionary type, and both key and value must be string type.| |
| `occurred_at` | Time when the event occurred. | |
---
## Supported options
### load_json
Load the json in the data of the request.
```json
{
"options": {
"load_json": [
"Message",
"AdditionalInfo"
]
}
}
```
### convert_data
Convert the data of the request using the jinja2 template.
```json
{
"options": {
"convert_data": {
"event_key": "{{ Message.id }}",
"title": "{{ Message.detail.EventID }}",
"account": "{{ Message.account }}",
"resource": {
"resource_id": "{{ Message.detail.SourceArn }}"
},
"occurred_at": "{{ Message.detail.Date }}"
}
}
}
```
### confirm_url
Confirm the URL of the webhook.
```json
{
"options": {
"confirm_url": "SubscribeURL"
}
}
```
## Release note
### Ver 1.2.5
Enhancement
- Add option to confirm the URL of the webhook
### Ver 1.2.4
Enhancement
- Add option to load json in the data of the request
- Add option to convert the data of the request using the jinja2 template
### Ver 1.1
Enhancement
- Add validation in API Direct Webhook [#7](https://github.com/spaceone-dev/plugin-api-direct-mon-webhook/issues/7)