Skip to content

Commit

Permalink
Merge branch 'main' into test/page_template
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Sep 6, 2022
2 parents 7ee2602 + cfe8ec2 commit e330e35
Show file tree
Hide file tree
Showing 31 changed files with 2,836 additions and 81 deletions.
263 changes: 249 additions & 14 deletions docs/api/actions-and-connectors/create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,26 @@ vary depending on the connector type. For example:
+
--
// tag::connector-config[]
.Index connectors
.Config properties
[%collapsible%open]
====
.{ibm-r} connectors
[%collapsible%open]
=====
`apiUrl`::
(Required, string) The {ibm-r} instance URL.

`orgId`::
(Required, string) The {ibm-r} organization ID.

For more information, refer to <<resilient-action-type>>.
=====
.Index connectors
[%collapsible%open]
=====

`executionTimeField`::
(Optional, string) Specifies a field that will contain the time the alert
condition was detected. The default value is `null`.
Expand All @@ -51,11 +68,11 @@ condition was detected. The default value is `null`.
request. The default value is `false`.

For more information, refer to <<index-action-type>>.
====
=====
.{jira} connectors
[%collapsible%open]
====
=====

`apiUrl`::
(Required, string) The {jira} instance URL.
Expand All @@ -64,11 +81,139 @@ For more information, refer to <<index-action-type>>.
(Required, string) The {jira} project key.

For more information, refer to <<jira-action-type>>.
====
=====
.{swimlane} connectors
[%collapsible%open]
=====
`apiUrl`::
(Required, string) The {swimlane} instance URL.

`appId`::
(Required, string) The {swimlane} application ID.

`connectorType`::
(Required, String) The type of the connector. Valid values are: `all`, `alerts`, `cases`.

`mappings`::
(Optional, object) The field mapping.
+
.Mappings properties
[%collapsible%open]
======
`alertIdConfig`:::
(Optional, object) Mapping for the alert ID.
`fieldType`::::
(Required, object) The type of the field in {swimlane}.
`id`::::
(Required, string) The id of the field in {swimlane}.
`key`::::
(Required, string) The key of the field in {swimlane}.
`name`::::
(Required, string) The name of the field in {swimlane}.
`caseIdConfig`:::
(Optional, object) Mapping for the case ID.
`fieldType`::::
(Required, object) The type of the field in {swimlane}.
`id`::::
(Required, string) The id of the field in {swimlane}.
`key`::::
(Required, string) The key of the field in {swimlane}.
`name`::::
(Required, string) The name of the field in {swimlane}.
`caseNameConfig`:::
(Optional, object) Mapping for the case name.
`fieldType`::::
(Required, object) The type of the field in {swimlane}.
`id`::::
(Required, string) The id of the field in {swimlane}.
`key`::::
(Required, string) The key of the field in {swimlane}.
`name`::::
(Required, string) The name of the field in {swimlane}.
`commentsConfig`:::
(Optional, object) Mapping for the case comments.
`fieldType`::::
(Required, object) The type of the field in {swimlane}.
`id`::::
(Required, string) The id of the field in {swimlane}.
`key`::::
(Required, string) The key of the field in {swimlane}.
`name`::::
(Required, string) The name of the field in {swimlane}.
`descriptionConfig`:::
(Optional, object) Mapping for the case description.
`fieldType`::::
(Required, object) The type of the field in {swimlane}.
`id`::::
(Required, string) The id of the field in {swimlane}.
`key`::::
(Required, string) The key of the field in {swimlane}.
`name`::::
(Required, string) The name of the field in {swimlane}.
`ruleNameConfig`:::
(Optional, object) Mapping for the name of the alert's rule.
`fieldType`::::
(Required, Object) The type of the field in {swimlane}.
`id`::::
(Required, string) The id of the field in {swimlane}.
`key`::::
(Required, string) The key of the field in {swimlane}.
`name`::::
(Required, string) The name of the field in {swimlane}.
`severityConfig`:::
(Optional, object) Mapping for the severity.
`fieldType`::::
(Required, object) The type of the field in {swimlane}.
`id`::::
(Required, string) The id of the field in {swimlane}.
`key`::::
(Required, string) The key of the field in {swimlane}.
`name`::::
(Required, string) The name of the field in {swimlane}.
======
For more information, refer to <<swimlane-action-type>>.
=====
.{webhook-cm} connectors
[%collapsible%open]
====
=====

`createCommentJson`::
(Optional, string) A JSON payload sent to the create comment URL to create a
Expand Down Expand Up @@ -217,11 +362,12 @@ https://testing-jira.atlassian.net/browse/{{{external.system.title}}}
----

For more information, refer to <<cases-webhook-action-type>>.
====
=====
This object is not required for server log connectors.
For more configuration properties, refer to <<action-types>>.
====
// end::connector-config[]
--

Expand All @@ -239,32 +385,51 @@ about the secrets configuration properties, refer to <<action-types>>.
+
--
WARNING: Remember these values. You must provide them each time you call the <<update-connector-api, update>> API.
--
+
--

// tag::connector-secrets[]
.{jira} connectors
.Secrets properties
[%collapsible%open]
====
.{ibm-r} connectors
[%collapsible%open]
=====
`apiKeyId`::
(Required, string) The authentication key ID for HTTP Basic authentication.

`apiKeySecret`::
(Required, string) The authentication key secret for HTTP Basic authentication.
=====
.{jira} connectors
[%collapsible%open]
=====
`apiToken`::
(Required, string) The {jira} API authentication token for HTTP basic
authentication.

`email`::
(Required, string) The account email for HTTP Basic authentication.
====
=====
.{swimlane} connectors
[%collapsible%open]
=====
`apiToken`::
(string) {swimlane} API authentication token.
=====
.{webhook-cm} connectors
[%collapsible%open]
====
=====
`password`::
(Optional, string) The password for HTTP basic authentication.

`user`::
(Optional, string) The username for HTTP basic authentication.
====

=====
This object is not required for index or server log connectors.
====
// end::connector-secrets[]
--

Expand All @@ -277,6 +442,8 @@ This object is not required for index or server log connectors.
[[create-connector-api-example]]
=== {api-examples-title}

Create an index connector:

[source,sh]
--------------------------------------------------
POST api/actions/connector
Expand Down Expand Up @@ -308,3 +475,71 @@ The API returns the following:
"is_missing_secrets": false
}
--------------------------------------------------

Create a {jira} connector:

[source,sh]
--------------------------------------------------
POST api/actions/connector
{
"name": "my-jira-connector",
"connector_type_id": ".jira",
"config": {
"apiUrl": "https://elastic.atlassian.net",
"projectKey": "ES"
},
"secrets": {
"email": "myEmail",
"apiToken": "myToken"
}
}
--------------------------------------------------
// KIBANA

Create an {ibm-r} connector:

[source,sh]
--------------------------------------------------
POST api/actions/connector
{
"name": "my-resilient-connector",
"connector_type_id": ".resilient",
"config": {
"apiUrl": "https://elastic.resilient.net",
"orgId": "201"
},
"secrets": {
"apiKeyId": "myKey",
"apiKeySecret": "myToken"
}
}
--------------------------------------------------
// KIBANA

Create a {swimlane} connector:

[source,sh]
--------------------------------------------------
POST api/actions/connector
{
"name":"my-swimlane-connector",
"connector_type_id": ".swimlane",
"config":{
"connectorType":"all",
"mappings":{
"ruleNameConfig":{
"id":"b6fst",
"name":"Alert Name",
"key":"alert-name",
"fieldType":"text"
}
},
"appId":"myAppID",
"apiUrl":"https://myswimlaneinstance.com"
},
"secrets":{
"apiToken":"myToken"
}
}
--------------------------------------------------
// KIBANA
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@
"deep-freeze-strict": "^1.1.1",
"deepmerge": "^4.2.2",
"del": "^6.1.0",
"elastic-apm-http-client": "^11.0.1",
"elastic-apm-node": "^3.38.0",
"email-addresses": "^5.0.0",
"execa": "^4.0.2",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-apm-synthtrace/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ RUNTIME_DEPS = [
"@npm//yargs",
"@npm//node-fetch",
"@npm//semver",
"@npm//elastic-apm-http-client",
]

TYPES_DEPS = [
Expand Down
Loading

0 comments on commit e330e35

Please sign in to comment.