Skip to content

Commit 22b4e40

Browse files
[Alerting][Connectors] Refactor IBM Resilient: Generic Implementation (phase one) (#74357)
Co-authored-by: Elastic Machine <[email protected]>
1 parent 177d67e commit 22b4e40

File tree

68 files changed

+2660
-1600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2660
-1600
lines changed

x-pack/plugins/actions/README.md

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -331,15 +331,17 @@ const result = await actionsClient.execute({
331331

332332
Kibana ships with a set of built-in action types:
333333

334-
| Type | Id | Description |
335-
| ------------------------- | ------------- | ------------------------------------------------------------------ |
336-
| [Server log](#server-log) | `.server-log` | Logs messages to the Kibana log using Kibana's logger |
337-
| [Email](#email) | `.email` | Sends an email using SMTP |
338-
| [Slack](#slack) | `.slack` | Posts a message to a slack channel |
339-
| [Index](#index) | `.index` | Indexes document(s) into Elasticsearch |
340-
| [Webhook](#webhook) | `.webhook` | Send a payload to a web service using HTTP POST or PUT |
341-
| [PagerDuty](#pagerduty) | `.pagerduty` | Trigger, resolve, or acknowlege an incident to a PagerDuty service |
342-
| [ServiceNow](#servicenow) | `.servicenow` | Create or update an incident to a ServiceNow instance |
334+
| Type | Id | Description |
335+
| ------------------------------- | ------------- | ------------------------------------------------------------------ |
336+
| [Server log](#server-log) | `.server-log` | Logs messages to the Kibana log using Kibana's logger |
337+
| [Email](#email) | `.email` | Sends an email using SMTP |
338+
| [Slack](#slack) | `.slack` | Posts a message to a slack channel |
339+
| [Index](#index) | `.index` | Indexes document(s) into Elasticsearch |
340+
| [Webhook](#webhook) | `.webhook` | Send a payload to a web service using HTTP POST or PUT |
341+
| [PagerDuty](#pagerduty) | `.pagerduty` | Trigger, resolve, or acknowlege an incident to a PagerDuty service |
342+
| [ServiceNow](#servicenow) | `.servicenow` | Create or update an incident to a ServiceNow instance |
343+
| [Jira](#jira) | `.jira` | Create or update an issue to a Jira instance |
344+
| [IBM Resilient](#ibm-resilient) | `.resilient` | Create or update an incident to a IBM Resilient instance |
343345

344346
---
345347

@@ -561,8 +563,8 @@ The ServiceNow action uses the [V2 Table API](https://developer.servicenow.com/a
561563
| Property | Description | Type |
562564
| ------------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------- |
563565
| savedObjectId | The id of the saved object. | string |
564-
| title | The title of the case. | string _(optional)_ |
565-
| description | The description of the case. | string _(optional)_ |
566+
| title | The title of the incident. | string _(optional)_ |
567+
| description | The description of the incident. | string _(optional)_ |
566568
| comment | A comment. | string _(optional)_ |
567569
| comments | The comments of the case. A comment is of the form `{ commentId: string, version: string, comment: string }`. | object[] _(optional)_ |
568570
| externalId | The id of the incident in ServiceNow. If presented the incident will be update. Otherwise a new incident will be created. | string _(optional)_ |
@@ -601,16 +603,16 @@ The Jira action uses the [V2 API](https://developer.atlassian.com/cloud/jira/pla
601603

602604
#### `subActionParams (pushToService)`
603605

604-
| Property | Description | Type |
605-
| ------------- | ------------------------------------------------------------------------------------------------------------------- | --------------------- |
606-
| savedObjectId | The id of the saved object | string |
607-
| title | The title of the case | string _(optional)_ |
608-
| description | The description of the case | string _(optional)_ |
609-
| externalId | The id of the incident in Jira. If presented the incident will be update. Otherwise a new incident will be created. | string _(optional)_ |
610-
| issueType | The id of the issue type in Jira. | string _(optional)_ |
611-
| priority | The name of the priority in Jira. Example: `Medium`. | string _(optional)_ |
612-
| labels | An array of labels. | string[] _(optional)_ |
613-
| comments | The comments of the case. A comment is of the form `{ commentId: string, version: string, comment: string }` | object[] _(optional)_ |
606+
| Property | Description | Type |
607+
| ------------- | ---------------------------------------------------------------------------------------------------------------- | --------------------- |
608+
| savedObjectId | The id of the saved object | string |
609+
| title | The title of the issue | string _(optional)_ |
610+
| description | The description of the issue | string _(optional)_ |
611+
| externalId | The id of the issue in Jira. If presented the incident will be update. Otherwise a new incident will be created. | string _(optional)_ |
612+
| issueType | The id of the issue type in Jira. | string _(optional)_ |
613+
| priority | The name of the priority in Jira. Example: `Medium`. | string _(optional)_ |
614+
| labels | An array of labels. | string[] _(optional)_ |
615+
| comments | The comments of the case. A comment is of the form `{ commentId: string, version: string, comment: string }` | object[] _(optional)_ |
614616

615617
#### `subActionParams (issueTypes)`
616618

@@ -628,10 +630,10 @@ ID: `.resilient`
628630

629631
### `config`
630632

631-
| Property | Description | Type |
632-
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ |
633-
| apiUrl | IBM Resilient instance URL. | string |
634-
| incidentConfiguration | Case configuration object. The object should contain an attribute called `mapping`. A `mapping` is an array of objects. Each mapping object should be of the form `{ source: string, target: string, actionType: string }`. `source` is the Case field. `target` is the Jira field where `source` will be mapped to. `actionType` can be one of `nothing`, `overwrite` or `append`. For example the `{ source: 'title', target: 'summary', actionType: 'overwrite' }` record, inside mapping array, means that the title of a case will be mapped to the short description of an incident in IBM Resilient and will be overwrite on each update. | object |
633+
| Property | Description | Type |
634+
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
635+
| apiUrl | IBM Resilient instance URL. | string |
636+
| incidentConfiguration | Optional property and specific to **Cases only**. If defined, the object should contain an attribute called `mapping`. A `mapping` is an array of objects. Each mapping object should be of the form `{ source: string, target: string, actionType: string }`. `source` is the Case field. `target` is the Jira field where `source` will be mapped to. `actionType` can be one of `nothing`, `overwrite` or `append`. For example the `{ source: 'title', target: 'summary', actionType: 'overwrite' }` record, inside mapping array, means that the title of a case will be mapped to the short description of an incident in IBM Resilient and will be overwrite on each update. | object |
635637

636638
### `secrets`
637639

@@ -652,10 +654,12 @@ ID: `.resilient`
652654
| Property | Description | Type |
653655
| ------------- | ---------------------------------------------------------------------------------------------------------------------------- | --------------------- |
654656
| savedObjectId | The id of the saved object | string |
655-
| title | The title of the case | string _(optional)_ |
656-
| description | The description of the case | string _(optional)_ |
657-
| comments | The comments of the case. A comment is of the form `{ commentId: string, version: string, comment: string }` | object[] _(optional)_ |
657+
| title | The title of the incident | string _(optional)_ |
658+
| description | The description of the incident | string _(optional)_ |
659+
| comments | The comments of the incident. A comment is of the form `{ commentId: string, version: string, comment: string }` | object[] _(optional)_ |
658660
| externalId | The id of the incident in IBM Resilient. If presented the incident will be update. Otherwise a new incident will be created. | string _(optional)_ |
661+
| incidentTypes | An array with the ids of IBM Resilient incident types. | number[] _(optional)_ |
662+
| severityCode | IBM Resilient id of the severity code. | number _(optional)_ |
659663

660664
# Command Line Utility
661665

x-pack/plugins/actions/server/builtin_action_types/case/api.ts

Lines changed: 0 additions & 93 deletions
This file was deleted.

x-pack/plugins/actions/server/builtin_action_types/case/common_schema.ts

Lines changed: 0 additions & 43 deletions
This file was deleted.

x-pack/plugins/actions/server/builtin_action_types/case/common_types.ts

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)