> For the complete documentation index, see [llms.txt](https://cloudforet.gitbook.io/cloudforet-apis/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cloudforet.gitbook.io/cloudforet-apis/content/en/monitoring/v1/event.md).

# Event

An Event is an alarm raised by an external monitoring system and collected by a Cloudforet plugin.

> **Package : spaceone.api.monitoring.v1**

\ <br>

## Event

**Event Methods:**

| Method                                                                                                             | Request                                                                                                                                | Response                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [**create**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#create) | [CreateEventRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#createeventrequest) | [Empty](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#empty)           |
| [**get**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#get)       | [EventRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#eventrequest)             | [EventInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#eventinfo)   |
| [**list**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#list)     | [EventQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#eventquery)                 | [EventsInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#eventsinfo) |
| [**stat**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#stat)     | [EventStatQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#eventstatquery)         | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#struct)         |

<br>

### create

Creates a new Event. The Event creation process starts with validation checking whether the input data is from a webhook or not. After the input data is validated, the data is processed and used to create the Event.

<br>

### get

Gets a specific Event matching the input parameters, `event_id` and `domain_id`. Prints detailed information about the Event.

> **POST** /monitoring/v1/event/get

{{< tabs " get " >}}

{{< tab "Request Example" >}}

[EventRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#eventrequest)

* **event\_id** (string) `Required`

{{< highlight json >}} { "event\_id": "event-4e16ba3bd384", } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

[EventInfo](#EVENTINFO)

* **event\_id** (string) `Required`
* **event\_key** (string) `Required`
* **event\_type** (string) `Required`
* **title** (string) `Required`
* **description** (string) `Required`
* **severity** (string) `Required`
* **rule** (string) `Required`
* **image\_url** (string) `Required`
* **resources** (string) `Repeated` `Required`
* **provider** (string) `Required`
* **account** (string) `Required`
* **additional\_info** (Struct) `Required`
* **raw\_data** (Struct) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **project\_id** (string) `Required`
* **alert\_id** (string) `Required`
* **webhook\_id** (string) `Required`
* **created\_at** (string) `Required`
* **occurred\_at** (string) `Required`

{{< highlight json >}} { "event\_id": "event-4e16ba3bd384", "event\_key": "cfbdd0cee08f0f2664dbef297c370017", "event\_type": "ALERT", "title": "Notification of access to the SpaceONE bastion Host", "description": "SSH Access to stargate-dev-kubectl-amzl2 from spaceoneadm", "severity": "INFO", "resource": { "resource\_id": "server-1187737cc0d9", "resource\_type": "inventory.Server", "name": "stargate-dev-kubectl-amzl2" }, "raw\_data": { "resource": { "name": "stargate-dev-kubectl-amzl2", "resource\_id": "server-1187737cc0d9", "resource\_type": "inventory.Server" }, "event\_key": "cfbdd0cee08f0f2664dbef297c370017", "title": "Notification of access to the SpaceONE bastion Host", "severity": "INFO", "description": "SSH Access to stargate-dev-kubectl-amzl2 from spaceoneadm", "event\_type": "ALERT", "additional\_info": { "host": \[], "user": "spaceoneadm" } }, "additional\_info": { "host": "\[]", "user": "spaceoneadm" }, "alert\_id": "alert-06462f6cb54e", "webhook\_id": "webhook-ff9e2eda678a", "project\_id": "project-18655561c535", "domain\_id": "domain-58010aa2e451", "created\_at": "2022-06-21T00:34:58.034Z" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### list

Gets a list of all Events. You must specify the `domain_id`. You can use a query to get a filtered list of Events.

> **POST** /monitoring/v1/event/list

{{< tabs " list " >}}

{{< tab "Request Example" >}}

[EventQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/Event/README.md#eventquery)

* **query** (Query)
* **event\_id** (string)
* **event\_key** (string)
* **event\_type** (string)
* **severity** (string)
* **resource** (string)
* **provider** (string)
* **account** (string)
* **workspace\_id** (string)
* **project\_id** (string)
* **alert\_id** (string)
* **webhook\_id** (string)

{{< highlight json >}} { "query": {}, "domain\_id": "domain-58010aa2e451" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

[EventsInfo](#EVENTSINFO)

* **results** (EventInfo) `Repeated` `Required`
* **total\_count** (int32) `Required`

{{< highlight json >}} { "results": \[ { "event\_id": "event-4e16ba3bd384", "event\_key": "cfbdd0cee08f0f2664dbef297c370017", "event\_type": "ALERT", "title": "Notification of access to the SpaceONE bastion Host", "description": "SSH Access to stargate-dev-kubectl-amzl2 from spaceoneadm", "severity": "INFO", "resource": { "resource\_id": "server-1187737cc0d9", "resource\_type": "inventory.Server", "name": "stargate-dev-kubectl-amzl2" }, "raw\_data": { "resource": { "name": "stargate-dev-kubectl-amzl2", "resource\_type": "inventory.Server", "resource\_id": "server-1187737cc0d9" }, "event\_key": "cfbdd0cee08f0f2664dbef297c370017", "additional\_info": { "user": "spaceoneadm", "host": \[] }, "severity": "INFO", "description": "SSH Access to stargate-dev-kubectl-amzl2 from spaceoneadm", "title": "Notification of access to the SpaceONE bastion Host", "event\_type": "ALERT" }, "additional\_info": { "user": "spaceoneadm", "host": "\[]" }, "alert\_id": "alert-06462f6cb54e", "webhook\_id": "webhook-ff9e2eda678a", "project\_id": "project-18655561c535", "domain\_id": "domain-58010aa2e451", "created\_at": "2022-06-21T00:34:58.034Z" }, { "event\_id": "event-b178e1b71daf", "event\_key": "abc16e5455c26ab7611bf8aa8d1020cc", "event\_type": "ALERT", "title": "Notification of access to the SpaceONE bastion Host", "description": "SSH Access to stargate-dev-kubectl-amzl2 from <glee@mz.co.kr>", "severity": "INFO", "resource": { "resource\_id": "server-1187737cc0d9", "resource\_type": "inventory.Server", "name": "stargate-dev-kubectl-amzl2" }, "raw\_data": { "additional\_info": { "host": \[ "125.131.104.40" ], "user": "<glee@mz.co.kr>" }, "description": "SSH Access to stargate-dev-kubectl-amzl2 from <glee@mz.co.kr>", "severity": "INFO", "event\_type": "ALERT", "title": "Notification of access to the SpaceONE bastion Host", "resource": { "resource\_type": "inventory.Server", "name": "stargate-dev-kubectl-amzl2", "resource\_id": "server-1187737cc0d9" }, "event\_key": "abc16e5455c26ab7611bf8aa8d1020cc" }, "additional\_info": { "user": "<glee@mz.co.kr>", "host": "\['125.131.104.40']" }, "alert\_id": "alert-332617cf2894", "webhook\_id": "webhook-ff9e2eda678a", "project\_id": "project-18655561c535", "domain\_id": "domain-58010aa2e451", "created\_at": "2022-06-21T00:34:52.822Z" } ], "total\_count": 2 } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

<br>

### stat

> **POST** /monitoring/v1/event/stat

\ <br>

## Message

### CreateEventRequest

* **webhook\_id** (string) `Required`
* **access\_key** (string) `Required`
* **data** (Struct) `Required`

  <br>

### EventInfo

* **event\_id** (string) `Required`
* **event\_key** (string) `Required`
* **event\_type** (string) `Required`
* **title** (string) `Required`
* **description** (string) `Required`
* **severity** (string) `Required`
* **rule** (string) `Required`
* **image\_url** (string) `Required`
* **resources** (string) `Repeated` `Required`
* **provider** (string) `Required`
* **account** (string) `Required`
* **additional\_info** (Struct) `Required`
* **raw\_data** (Struct) `Required`
* **domain\_id** (string) `Required`
* **workspace\_id** (string) `Required`
* **project\_id** (string) `Required`
* **alert\_id** (string) `Required`
* **webhook\_id** (string) `Required`
* **created\_at** (string) `Required`
* **occurred\_at** (string) `Required`

  <br>

### EventQuery

* **query** (Query)
* **event\_id** (string)
* **event\_key** (string)
* **event\_type** (string)
* **severity** (string)
* **resource** (string)
* **provider** (string)
* **account** (string)
* **workspace\_id** (string)
* **project\_id** (string)
* **alert\_id** (string)
* **webhook\_id** (string)

  <br>

### EventRequest

* **event\_id** (string) `Required`

  <br>

### EventStatQuery

* **query** (StatisticsQuery) `Required`

  <br>

### EventsInfo

* **results** (EventInfo) `Repeated` `Required`
* **total\_count** (int32) `Required`

  <br>
