Skip to content

cloudforet-io/plugin-api-direct-mon-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webhook plugin for SpaceONE


SpaceONE's 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

Latest stable version : 1.2.5

Please contact us if you need any further information. ([email protected])


Body of the request

{
    "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.

{
    "options": {
        "load_json": [
            "Message",
            "AdditionalInfo"
        ]
    }
}

convert_data

Convert the data of the request using the jinja2 template.

{
    "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.

{
    "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