Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Alerting][Docs] Adding template for documenting alert and action types #92830

Merged
merged 21 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions docs/action-type-template.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[[<ACTION-TYPE>-action-type]]
=== <ACTION-TYPE> action

ymao1 marked this conversation as resolved.
Show resolved Hide resolved
Include a short description of the action type.

[float]
[[<ACTION-TYPE>-connector-configuration]]
==== Connector configuration

<ACTION-TYPE> connectors have the following configuration properties.

////
List of user-facing connector configurations. This should align with the fields available in the Create connector flyout form for this action type.
////

Property1:: A short description of this property.
Property2:: A short description of this property with format hints. This can be specified in `this specific format`.

[float]
[[Preconfigured-<ACTION-TYPE>-configuration]]
==== Preconfigured action type

////
Example preconfigured format for this action type
////

[source,text]
--
my-<ACTION-TYPE>:
name: preconfigured-<ACTION-TYPE>-action-type
actionTypeId: .<ACTION-TYPE>
config:
property1: value1
property2: value2
secrets:
property3: value3
--

[float]
[[<ACTION-TYPE>-connector-config-properties]]
////
List of properties from the ConfigSchema and SecretsSchema for this action type.
////
Config defines information for the action type.

`property1`:: A short description of this property.
`property2`:: A short descriptionn of this property.

Secrets defines sensitive information for the action type.

`property3`:: A short descriptionn of this property.

[float]
[[<ACTION-TYPE>-action-configuration]]
==== Action configuration

<ACTION-TYPE> actions have the following configuration properties.

////
List of user-facing action configurations. This should align with the fields available in the Action section of the Create/Update alert flyout.
////

Property1:: A short description of this property.
Property2:: A short description of this property with format hints. This can be specified in `this specific format`.

////
Optional - additional configuration details here
[[configuring-<ACTION-TYPE>]]
==== Configuring <ACTION-TYPE>
ymao1 marked this conversation as resolved.
Show resolved Hide resolved
////
47 changes: 47 additions & 0 deletions docs/alert-type-template.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[[alert-type-<ALERT TYPE>]]
=== <ALERT TYPE>

Include a short description of the alert type.

[float]
==== Create the alert

Fill in the <<defining-alerts-general-details, alert details>>, then select *<ALERT TYPE>*.

////
Optional, include a screenshot
[role="screenshot"]
image::user/alerting/images/alert-types-<ALERT TYPE>-select.png[Choose an <ALERT TYPE> alert type]
////

[float]
==== Conditions

Include all of the conditions for this alert type and a short description of each.

////
Optional, include a screenshot
[role="screenshot"]
image::user/alerting/images/alert-types-<ALERT TYPE>-conditions.png[Conditions for <ALERT TYPE> alert type]
////

Condition1:: This is a condition the user must define.
Condition2:: This is another condition the user must define.

[float]
==== Action variables

When the <ALERT TYPE> alert condition is met, the following variables are available to each action, in addition to the <<defining-alerts-actions-variables, variables common to all alerts>>:

`context.variableA`:: A short description of the context variable defined by the alert type.
`context.variableB`:: A short description of the context variable defined by the alert type with an example. Example: `this is what variableB outputs`.

<<defining-alerts-actions-details, Add an action>> to the alert to use these variables.

////
Optional, include a step-by-step example for creating this alert
[float]
==== Example

In this section, you will use the {kib} <<add-sample-data, weblog sample dataset>> to setup and tune the conditions on an <ALERT TYPE> alert. For this example, we want to detect when <DESCRIBE THE CONDITIONS>.
////
54 changes: 16 additions & 38 deletions docs/user/alerting/action-types/email.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ NOTE: For emails to have a footer with a link back to {kib}, set the <<server-pu
[[email-connector-configuration]]
==== Connector configuration

Email connectors have the following configuration properties:
Email connectors have the following configuration properties.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed from : to . as per @gchaps suggestion


Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
Sender:: The from address for all emails sent with this connector. This can be specified in `user@host-name` format or as `"human name <user@host-name>"` format. See the https://nodemailer.com/message/addresses/[Nodemailer address documentation] for more information.
Host:: Host name of the service provider. If you are using the <<action-settings, `xpack.actions.allowedHosts`>> setting, make sure this hostname is added to the allowed hosts.
Port:: The port to connect to on the service provider.
Secure:: If true, the connection will use TLS when connecting to the service provider. Refer to the https://nodemailer.com/smtp/#tls-options[Nodemailer TLS documentation] for more information. If not true, the connection will initially connect over TCP, then attempt to switch to TLS via the SMTP STARTTLS command.
User:: Username for login type authentication.
Require authentication:: If true, a username and password for login type authentication must be provided.
Username:: Username for login type authentication.
Password:: Password for login type authentication.

[float]
Expand All @@ -39,56 +40,33 @@ Password:: Password for login type authentication.
password: passwordkeystorevalue
--

[[email-connector-config-properties]]
**`config`** defines the action type specific to the configuration and contains the following properties:
Config defines information for the action type
ymao1 marked this conversation as resolved.
Show resolved Hide resolved

[cols="2*<"]
|===
`service`:: The name of a https://nodemailer.com/smtp/well-known/[well-known email service provider]. If `service` is provided, `host`, `port`, and `secure` properties are ignored. For more information on the `gmail` service value, see the (https://nodemailer.com/usage/using-gmail/)[Nodemailer Gmail documentation].
ymao1 marked this conversation as resolved.
Show resolved Hide resolved
`from`:: An email address that corresponds to *Sender*.
`host`:: A string that corresponds to *Host*.
`port`:: A number that corresponds to *Port*.
`secure`:: A boolean that corresponds to *Secure*.
`hasAuth`:: A boolean that corresponds to *Requires authentication*. If `true`, this connector will require values for `user` and `password` inside the secrets configuration. Defaults to `true`.

| `service`
| The name of a https://nodemailer.com/smtp/well-known/[well-known email service provider]. If `service` is provided, `host`, `port`, and `secure` properties are ignored. For more information on the `gmail` service value, see the (https://nodemailer.com/usage/using-gmail/)[Nodemailer Gmail documentation].
Secrets defines sensitive information for the action type.

| `from`
| An email address that corresponds to *Sender*.
`user`:: A string that corresponds to *Username*. Required if `hasAuth` is set to `true`.
`password`:: A string that corresponds to *Password*. Should be stored in the <<creating-keystore, {kib} keystore>>. Required if `hasAuth` is set to `true`.

| `host`
| A string that corresponds to *Host*.

| `port`
| A number that corresponds to *Port*.

| `secure`
| A boolean that corresponds to *Secure*.

| `hasAuth`
| If `true`, this connector will require values for `user` and `password` inside the secrets configuration. Defaults to `true`.

|===

**`secrets`** defines sensitive information for the action type and contains the following properties:

[cols="2*<"]
|===

| `user`
| A string that corresponds to *User*. Required if `hasAuth` is set to `true`.

| `password`
| A string that corresponds to *Password*. Should be stored in the <<creating-keystore, {kib} keystore>>. Required if `hasAuth` is set to `true`.

|===

[float]
[[email-action-configuration]]
==== Action configuration

Email actions have the following configuration properties:
Email actions have the following configuration properties.

To, CC, BCC:: Each is a list of addresses. Addresses can be specified in `user@host-name` format, or in `name <user@host-name>` format. One of To, CC, or BCC must contain an entry.
ymao1 marked this conversation as resolved.
Show resolved Hide resolved
Subject:: The subject line of the email.
Message:: The message text of the email. Markdown format is supported.

[[configuring-email]]
==== Configuring email accounts
==== Configuring email accounts for well-known services

The email action can send email using many popular SMTP email services.

Expand Down
24 changes: 6 additions & 18 deletions docs/user/alerting/action-types/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The index action type will index a document into {es}. See also the {ref}/indice
[[index-connector-configuration]]
==== Connector configuration

Index connectors have the following configuration properties:
Index connectors have the following configuration properties.

Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
Index:: The {es} index to be written to.
Expand All @@ -30,29 +30,17 @@ Execution time field:: This field will be automatically set to the time the ale
executionTimeField: somedate
--

[[index-connector-config-properties]]
**`config`** defines the action type specific to the configuration and contains the following properties:

[cols="2*<"]
|===

|`index`
| A string that corresponds to *Index*.

|`refresh`
| A boolean that corresponds to *Refresh*. Defaults to `false`.

|`executionTimeField`
| A string that corresponds to *Execution time field*.

|===
Config defines information for the action type.

`index`:: A string that corresponds to *Index*.
`refresh`:: A boolean that corresponds to *Refresh*. Defaults to `false`.
`executionTimeField`:: A string that corresponds to *Execution time field*.

[float]
[[index-action-configuration]]
==== Action configuration

Index actions have the following properties:
Index actions have the following properties.

Document:: The document to index in JSON format.
ymao1 marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
34 changes: 9 additions & 25 deletions docs/user/alerting/action-types/jira.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Jira action type uses the https://developer.atlassian.com/cloud/jira/platfor
[[jira-connector-configuration]]
==== Connector configuration

Jira connectors have the following configuration properties:
Jira connectors have the following configuration properties.

Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** UI connector listing, and in the connector list when configuring an action.
URL:: Jira instance URL.
Expand All @@ -33,37 +33,21 @@ API token (or password):: Jira API authentication token (or password) for HTTP
apiToken: tokenkeystorevalue
--

[[jira-connector-config-properties]]
**`config`** defines the action type specific to the configuration and contains the following properties:
Config defines information for the action type.

[cols="2*<"]
|===
`apiUrl`:: An address that corresponds to *URL*.
`projectKey`:: A key that corresponds to *Project Key*.

| `apiUrl`
| An address that corresponds to *URL*.
Secrets defines sensitive information for the action type.

| `projectKey`
| A key that corresponds to *Project Key*.

|===

**`secrets`** defines sensitive information for the action type and contains the following properties:

[cols="2*<"]
|===

| `email`
| A string that corresponds to *Email*.

| `apiToken`
| A string that corresponds to *API Token*. Should be stored in the <<creating-keystore, {kib} keystore>>.

|===
`email`:: A string that corresponds to *Email*.
`apiToken`:: A string that corresponds to *API Token*. Should be stored in the <<creating-keystore, {kib} keystore>>.

[float]
[[jira-action-configuration]]
==== Action configuration

Jira actions have the following configuration properties:
Jira actions have the following configuration properties.

Subaction:: The subaction to perform: `pushToService`, `getIncident`, `issueTypes`, `fieldsByIssueType`, `issues`, `issue`, or `getFields`.
Subaction params:: The parameters of the subaction.
ymao1 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
25 changes: 6 additions & 19 deletions docs/user/alerting/action-types/pagerduty.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ This is an irreversible action and impacts all alerts that use this connector.
[[pagerduty-connector-configuration]]
==== Connector configuration

PagerDuty connectors have the following configuration properties:
PagerDuty connectors have the following configuration properties.

Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
API URL:: An optional PagerDuty event URL. Defaults to `https://events.pagerduty.com/v2/enqueue`. If you are using the <<action-settings, `xpack.actions.allowedHosts`>> setting, make sure the hostname is added to the allowed hosts.
Expand All @@ -150,32 +150,19 @@ Integration Key:: A 32 character PagerDuty Integration Key for an integration
routingKey: testroutingkey
--

[[pagerduty-connector-config-properties]]
**`config`** defines the action type specific to the configuration and contains the following properties:
Config defines information for the action type.
ymao1 marked this conversation as resolved.
Show resolved Hide resolved

[cols="2*<"]
|===
`apiURL`:: A URL string that corresponds to *API URL*.

|`apiURL`
| A URL string that corresponds to *API URL*.
Secrets defines sensitive information for the action type.

|===

**`secrets`** defines sensitive information for the action type and contains the following properties:

[cols="2*<"]
|===

|`routingKey`
| A string that corresponds to *Integration Key*.

|===
`routingKey`:: A string that corresponds to *Integration Key*.

[float]
[[pagerduty-action-configuration]]
==== Action configuration

PagerDuty actions have the following properties:
PagerDuty actions have the following properties.

Severity:: The perceived severity of on the affected system. This can be one of `Critical`, `Error`, `Warning` or `Info`(default).
Event action:: One of `Trigger` (default), `Resolve`, or `Acknowledge`. See https://v2.developer.pagerduty.com/docs/events-api-v2#event-action[event action] for more details.
Expand Down
Loading