-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Alerting][Docs] Adding template for documenting alert and action types #92830
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
0aa827f
Alert type template
ymao1 4222fc4
Action type template
ymao1 5a332e8
Cleanup
ymao1 7b9ee25
Cleanup
ymao1 cd216e3
Removing callout list
ymao1 bc3d3bf
Merge branch 'master' of https://github.com/elastic/kibana into alert…
ymao1 32afb94
Merge branch 'master' into alerting/doc-template
kibanamachine 625c0e8
Merging in master
ymao1 c1434ea
Merge branch 'alerting/doc-template' of https://github.com/ymao1/kiba…
ymao1 bd3db14
Cleanup
ymao1 4988d06
Apply suggestions from code review
ymao1 99ecd2b
Adding title to actions page
ymao1 2fa86f7
PR fixes
ymao1 0f5e5c0
Merge branch 'master' into alerting/doc-template
kibanamachine 0987b59
Merge branch 'master' of https://github.com/elastic/kibana into alert…
ymao1 167cc52
PR fixes
ymao1 738cd45
Merging in master
ymao1 5fe1783
Merge branch 'master' of https://github.com/elastic/kibana into alert…
ymao1 a0874ea
PR fixes
ymao1 1f70e58
Merge branch 'master' of https://github.com/elastic/kibana into alert…
ymao1 630f32b
PR fixes
ymao1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| [[<ACTION-TYPE>-action-type]] | ||
| === <ACTION-TYPE> action | ||
| ++++ | ||
| <titleabbrev><ACTION-TYPE></titleabbrev> | ||
| ++++ | ||
|
|
||
| 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>]] | ||
| ==== Configure <ACTION-TYPE> | ||
| //// | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| [[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>*. | ||
|
|
||
| [float] | ||
| ==== Define the conditions | ||
|
|
||
| Define properties to detect the condition. | ||
|
|
||
| //// | ||
| 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] | ||
| ==== Add action variables | ||
|
|
||
| <<defining-alerts-actions-details, Add an action>> to run when the alert condition is met. The following variables are specific to the <ALERT TYPE> alert. You can also specify <<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`. | ||
|
|
||
| //// | ||
| 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>. | ||
| //// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,9 @@ | ||
| [role="xpack"] | ||
| [[email-action-type]] | ||
| === Email action | ||
| ++++ | ||
| <titleabbrev>Email</titleabbrev> | ||
| ++++ | ||
|
|
||
| The email action type uses the SMTP protocol to send mail message, using an integration of https://nodemailer.com/[Nodemailer]. Email message text is sent as both plain text and html text. | ||
|
|
||
|
|
@@ -10,14 +13,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. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed from |
||
|
|
||
| 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] | ||
|
|
@@ -39,56 +43,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. | ||
|
|
||
| [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]. | ||
| `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. | ||
| To, CC, BCC:: Each item 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. | ||
| 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. | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.