kibana/docs/user/alerting/action-types/pre-configured-connectors.asciidoc
ymao1 71ed148cfe
[Alerting] Preconfigured alert history index connector (#94909)
* Adding preconfigured alert history index

* Adding functions to build alert history document

* Adding functions to build alert history document

* Moving index template creation to plugin start

* Adding unit tests

* Adding unit tests

* Adding unit tests

* Simplifying

* Revert "Merge branch 'master' of https://github.com/elastic/kibana into alerting/default-es-index-schema"

This reverts commit 957c333aa4, reversing
changes made to 4b1b78761e.

* Reverting some changes

* Reverting some changes

* Adding index override

* Updating UI with index override

* Only allow indexOverride for preconfigured alert history connector

* Handling preconfigured connector id clashes

* Cleanup

* UI unit tests

* Fixing default schema shown in UI

* Fixing functional tests

* Adding functional test

* Fixing functional tests

* Adding docs and link to docs

* Adding config to docker allowlist

* Fixing wrong typescript operator

* Changing default for config to false

* Cleanup

* Adding note about index privileges to docs

* Fixing i18n

* PR fixes

* PR fixes

* PR fixes

* PR fixes - wording

* PR fixes

* Fixing unit and functional tests

* Fixing types check

* ES -> Elasticsearch

* Moving files

* Adding kibana- to beginning of prefix

* Namespacing alert data within schema with kibana

* Fix i18n

* Updating docs

* Fixing unit tests

* Fixing doc links

* Fixing types check

* PR fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-08 18:18:44 -04:00

74 lines
2.8 KiB
Plaintext

[role="xpack"]
[[pre-configured-connectors]]
=== Preconfigured connectors
You can preconfigure a connector to have all the information it needs prior to startup by adding it to the `kibana.yml` file.
Preconfigured connectors offer the following benefits:
- Require no setup. Configuration and credentials needed to execute an
action are predefined, including the connector name and ID.
- Appear in all spaces because they are not saved objects.
- Cannot be edited or deleted.
[float]
[[preconfigured-connector-example]]
==== Preconfigured connectors example
This example shows a valid configuration for
two out-of-the box connectors: <<slack-action-type, Slack>> and <<webhook-action-type, Webhook>>.
```js
xpack.actions.preconfigured:
my-slack1: <1>
actionTypeId: .slack <2>
name: 'Slack #xyz' <3>
secrets:
webhookUrl: 'https://hooks.slack.com/services/abcd/efgh/ijklmnopqrstuvwxyz'
webhook-service:
actionTypeId: .webhook
name: 'Email service'
config: <4>
url: 'https://email-alert-service.elastic.co'
method: post
headers:
header1: value1
header2: value2
secrets: <5>
user: elastic
password: changeme
```
<1> The key is the connector identifier, `my-slack1` in this example.
<2> `actionTypeId` is the action type identifier.
<3> `name` is the name of the preconfigured connector.
<4> `config` is the configuration specific to the connector type.
<5> `secrets` is the sensitive configuration, such as username, password, and keys, specific to the connector type.
[NOTE]
==============================================
Sensitive properties, such as passwords, can also be stored in the <<creating-keystore, {kib} keystore>>.
==============================================
[float]
[[build-in-preconfigured-connectors]]
==== Built-in preconfigured connectors
{kib} provides one built-in preconfigured connector:
* <<preconfigured-connector-alert-history, Alert history preconfigured {es} index connector>>
[float]
[[managing-pre-configured-connectors]]
==== View preconfigured connectors
When you open the main menu, click *Stack Management > Rules and Connectors*. Preconfigured connectors appear on the <<connector-management, *Connectors* tab>>, regardless of which space you are in. They are tagged as “preconfigured”, and you cannot delete them.
[role="screenshot"]
image::images/pre-configured-connectors-managing.png[Connectors managing tab with pre-configured]
Clicking a preconfigured connector shows the description, but not the configuration. A message indicates that this is a preconfigured connector.
[role="screenshot"]
image::images/pre-configured-connectors-view-screen.png[Pre-configured connector view details]