[OAS] Add support for links and custom_details in PagerDuty connector (#171812)

This commit is contained in:
Lisa Cawley 2023-11-24 09:09:57 -08:00 committed by GitHub
parent ea85f2a479
commit 1a2363dd1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 365 additions and 0 deletions

View file

@ -303,6 +303,9 @@
"runJiraConnectorRequest": {
"$ref": "#/components/examples/run_jira_connector_request"
},
"runPagerDutyConnectorRequest": {
"$ref": "#/components/examples/run_pagerduty_connector_request"
},
"runServerLogConnectorRequest": {
"$ref": "#/components/examples/run_server_log_connector_request"
},
@ -368,6 +371,9 @@
"runJiraConnectorResponse": {
"$ref": "#/components/examples/run_jira_connector_response"
},
"runPagerDutyConnectorResponse": {
"$ref": "#/components/examples/run_pagerduty_connector_response"
},
"runServerLogConnectorResponse": {
"$ref": "#/components/examples/run_server_log_connector_response"
},
@ -4759,6 +4765,30 @@
}
]
},
"run_connector_params_acknowledge_resolve_pagerduty": {
"title": "PagerDuty connector parameters",
"description": "Test an action that acknowledges or resolves a PagerDuty alert.",
"type": "object",
"required": [
"dedupKey",
"eventAction"
],
"properties": {
"dedupKey": {
"description": "The deduplication key for the PagerDuty alert.",
"type": "string",
"maxLength": 255
},
"eventAction": {
"description": "The type of event.",
"type": "string",
"enum": [
"acknowledge",
"resolve"
]
}
}
},
"run_connector_params_documents": {
"title": "Index connector parameters",
"description": "Test an action that indexes a document into Elasticsearch.",
@ -4863,6 +4893,89 @@
}
}
},
"run_connector_params_trigger_pagerduty": {
"title": "PagerDuty connector parameters",
"description": "Test an action that triggers a PagerDuty alert.",
"type": "object",
"required": [
"eventAction"
],
"properties": {
"class": {
"description": "The class or type of the event.",
"type": "string",
"example": "cpu load"
},
"component": {
"description": "The component of the source machine that is responsible for the event.",
"type": "string",
"example": "eth0"
},
"customDetails": {
"description": "Additional details to add to the event.",
"type": "object"
},
"dedupKey": {
"description": "All actions sharing this key will be associated with the same PagerDuty alert. This value is used to correlate trigger and resolution.\n",
"type": "string",
"maxLength": 255
},
"eventAction": {
"description": "The type of event.",
"type": "string",
"enum": [
"trigger"
]
},
"group": {
"description": "The logical grouping of components of a service.",
"type": "string",
"example": "app-stack"
},
"links": {
"description": "A list of links to add to the event.",
"type": "array",
"items": {
"type": "object",
"properties": {
"href": {
"description": "The URL for the link.",
"type": "string"
},
"text": {
"description": "A plain text description of the purpose of the link.",
"type": "string"
}
}
}
},
"severity": {
"description": "The severity of the event on the affected system.",
"type": "string",
"enum": [
"critical",
"error",
"info",
"warning"
],
"default": "info"
},
"source": {
"description": "The affected system, such as a hostname or fully qualified domain name. Defaults to the Kibana saved object id of the action.\n",
"type": "string"
},
"summary": {
"description": "A summery of the event.",
"type": "string",
"maxLength": 1024
},
"timestamp": {
"description": "An ISO-8601 timestamp that indicates when the event was detected or generated.",
"type": "string",
"format": "date-time"
}
}
},
"run_connector_subaction_addevent": {
"title": "The addEvent subaction",
"type": "object",
@ -5510,6 +5623,9 @@
"properties": {
"params": {
"oneOf": [
{
"$ref": "#/components/schemas/run_connector_params_acknowledge_resolve_pagerduty"
},
{
"$ref": "#/components/schemas/run_connector_params_documents"
},
@ -5519,6 +5635,9 @@
{
"$ref": "#/components/schemas/run_connector_params_message_serverlog"
},
{
"$ref": "#/components/schemas/run_connector_params_trigger_pagerduty"
},
{
"title": "Subaction parameters",
"description": "Test an action that involves a subaction.",
@ -5839,6 +5958,24 @@
}
}
},
"run_pagerduty_connector_request": {
"summary": "Run a PagerDuty connector to trigger an alert.",
"value": {
"params": {
"eventAction": "trigger",
"summary": "A brief event summary",
"links": [
{
"href": "http://example.com/pagerduty",
"text": "An example link"
}
],
"customDetails": {
"my_data_1": "test data"
}
}
}
},
"run_server_log_connector_request": {
"summary": "Run a server log connector.",
"value": {
@ -5975,6 +6112,18 @@
"status": "ok"
}
},
"run_pagerduty_connector_response": {
"summary": "Response from running a PagerDuty connector.",
"value": {
"connector_id": "45de9f70-954f-4608-b12a-db7cf808e49d",
"data": {
"dedup_key": "5115e138b26b484a81eaea779faa6016",
"message": "Event processed",
"status": "success"
},
"status": "ok"
}
},
"run_server_log_connector_response": {
"summary": "Response from running a server log connector.",
"value": {

View file

@ -185,6 +185,8 @@ paths:
$ref: '#/components/examples/run_index_connector_request'
runJiraConnectorRequest:
$ref: '#/components/examples/run_jira_connector_request'
runPagerDutyConnectorRequest:
$ref: '#/components/examples/run_pagerduty_connector_request'
runServerLogConnectorRequest:
$ref: '#/components/examples/run_server_log_connector_request'
runServiceNowITOMConnectorRequest:
@ -227,6 +229,8 @@ paths:
$ref: '#/components/examples/run_index_connector_response'
runJiraConnectorResponse:
$ref: '#/components/examples/run_jira_connector_response'
runPagerDutyConnectorResponse:
$ref: '#/components/examples/run_pagerduty_connector_response'
runServerLogConnectorResponse:
$ref: '#/components/examples/run_server_log_connector_response'
runServiceNowITOMConnectorResponse:
@ -3337,6 +3341,24 @@ components:
- $ref: '#/components/schemas/update_connector_request_torq'
- $ref: '#/components/schemas/update_connector_request_webhook'
- $ref: '#/components/schemas/update_connector_request_xmatters'
run_connector_params_acknowledge_resolve_pagerduty:
title: PagerDuty connector parameters
description: Test an action that acknowledges or resolves a PagerDuty alert.
type: object
required:
- dedupKey
- eventAction
properties:
dedupKey:
description: The deduplication key for the PagerDuty alert.
type: string
maxLength: 255
eventAction:
description: The type of event.
type: string
enum:
- acknowledge
- resolve
run_connector_params_documents:
title: Index connector parameters
description: Test an action that indexes a document into Elasticsearch.
@ -3414,6 +3436,71 @@ components:
message:
type: string
description: The message for server log connectors.
run_connector_params_trigger_pagerduty:
title: PagerDuty connector parameters
description: Test an action that triggers a PagerDuty alert.
type: object
required:
- eventAction
properties:
class:
description: The class or type of the event.
type: string
example: cpu load
component:
description: The component of the source machine that is responsible for the event.
type: string
example: eth0
customDetails:
description: Additional details to add to the event.
type: object
dedupKey:
description: |
All actions sharing this key will be associated with the same PagerDuty alert. This value is used to correlate trigger and resolution.
type: string
maxLength: 255
eventAction:
description: The type of event.
type: string
enum:
- trigger
group:
description: The logical grouping of components of a service.
type: string
example: app-stack
links:
description: A list of links to add to the event.
type: array
items:
type: object
properties:
href:
description: The URL for the link.
type: string
text:
description: A plain text description of the purpose of the link.
type: string
severity:
description: The severity of the event on the affected system.
type: string
enum:
- critical
- error
- info
- warning
default: info
source:
description: |
The affected system, such as a hostname or fully qualified domain name. Defaults to the Kibana saved object id of the action.
type: string
summary:
description: A summery of the event.
type: string
maxLength: 1024
timestamp:
description: An ISO-8601 timestamp that indicates when the event was detected or generated.
type: string
format: date-time
run_connector_subaction_addevent:
title: The addEvent subaction
type: object
@ -3878,9 +3965,11 @@ components:
properties:
params:
oneOf:
- $ref: '#/components/schemas/run_connector_params_acknowledge_resolve_pagerduty'
- $ref: '#/components/schemas/run_connector_params_documents'
- $ref: '#/components/schemas/run_connector_params_message_email'
- $ref: '#/components/schemas/run_connector_params_message_serverlog'
- $ref: '#/components/schemas/run_connector_params_trigger_pagerduty'
- title: Subaction parameters
description: Test an action that involves a subaction.
oneOf:
@ -4111,6 +4200,17 @@ components:
value:
params:
subAction: issueTypes
run_pagerduty_connector_request:
summary: Run a PagerDuty connector to trigger an alert.
value:
params:
eventAction: trigger
summary: A brief event summary
links:
- href: http://example.com/pagerduty
text: An example link
customDetails:
my_data_1: test data
run_server_log_connector_request:
summary: Run a server log connector.
value:
@ -4202,6 +4302,15 @@ components:
- id: 10000
name: Epic
status: ok
run_pagerduty_connector_response:
summary: Response from running a PagerDuty connector.
value:
connector_id: 45de9f70-954f-4608-b12a-db7cf808e49d
data:
dedup_key: 5115e138b26b484a81eaea779faa6016
message: Event processed
status: success
status: ok
run_server_log_connector_response:
summary: Response from running a server log connector.
value:

View file

@ -0,0 +1,10 @@
summary: Run a PagerDuty connector to trigger an alert.
value:
params:
eventAction: trigger
summary: A brief event summary
links:
- href: http://example.com/pagerduty
text: An example link
customDetails:
my_data_1: test data

View file

@ -0,0 +1,8 @@
summary: Response from running a PagerDuty connector.
value:
connector_id: 45de9f70-954f-4608-b12a-db7cf808e49d
data:
dedup_key: 5115e138b26b484a81eaea779faa6016
message: Event processed
status: success
status: ok

View file

@ -0,0 +1,17 @@
title: PagerDuty connector parameters
description: Test an action that acknowledges or resolves a PagerDuty alert.
type: object
required:
- dedupKey
- eventAction
properties:
dedupKey:
description: The deduplication key for the PagerDuty alert.
type: string
maxLength: 255
eventAction:
description: The type of event.
type: string
enum:
- acknowledge
- resolve

View file

@ -0,0 +1,66 @@
title: PagerDuty connector parameters
description: Test an action that triggers a PagerDuty alert.
type: object
required:
- eventAction
properties:
class:
description: The class or type of the event.
type: string
example: cpu load
component:
description: The component of the source machine that is responsible for the event.
type: string
example: eth0
customDetails:
description: Additional details to add to the event.
type: object
dedupKey:
description: >
All actions sharing this key will be associated with the same PagerDuty alert.
This value is used to correlate trigger and resolution.
type: string
maxLength: 255
eventAction:
description: The type of event.
type: string
enum:
- trigger
group:
description: The logical grouping of components of a service.
type: string
example: app-stack
links:
description: A list of links to add to the event.
type: array
items:
type: object
properties:
href:
description: The URL for the link.
type: string
text:
description: A plain text description of the purpose of the link.
type: string
severity:
description: The severity of the event on the affected system.
type: string
enum:
- critical
- error
- info
- warning
default: info
source:
description: >
The affected system, such as a hostname or fully qualified domain name.
Defaults to the Kibana saved object id of the action.
type: string
summary:
description: A summery of the event.
type: string
maxLength: 1024
timestamp:
description: An ISO-8601 timestamp that indicates when the event was detected or generated.
type: string
format: date-time

View file

@ -6,9 +6,11 @@ required:
properties:
params:
oneOf:
- $ref: 'run_connector_params_acknowledge_resolve_pagerduty.yaml'
- $ref: 'run_connector_params_documents.yaml'
- $ref: 'run_connector_params_message_email.yaml'
- $ref: 'run_connector_params_message_serverlog.yaml'
- $ref: 'run_connector_params_trigger_pagerduty.yaml'
- title: Subaction parameters
description: Test an action that involves a subaction.
oneOf:

View file

@ -23,6 +23,8 @@ post:
$ref: '../components/examples/run_index_connector_request.yaml'
runJiraConnectorRequest:
$ref: '../components/examples/run_jira_connector_request.yaml'
runPagerDutyConnectorRequest:
$ref: '../components/examples/run_pagerduty_connector_request.yaml'
runServerLogConnectorRequest:
$ref: '../components/examples/run_server_log_connector_request.yaml'
runServiceNowITOMConnectorRequest:
@ -65,6 +67,8 @@ post:
$ref: '../components/examples/run_index_connector_response.yaml'
runJiraConnectorResponse:
$ref: '../components/examples/run_jira_connector_response.yaml'
runPagerDutyConnectorResponse:
$ref: '../components/examples/run_pagerduty_connector_response.yaml'
runServerLogConnectorResponse:
$ref: '../components/examples/run_server_log_connector_response.yaml'
runServiceNowITOMConnectorResponse: