Preconfigured connectors and action types
You can preconfigure a connector or action type to have all the information it needs prior to startup by adding it to the kibana.yml
file.
Preconfigured connectors offer the following capabilities:
- 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.
A preconfigured action type has only preconfigured connectors. Preconfigured connectors can belong to either the preconfigured action type or to the regular action type.
Preconfigured connectors
This example shows a valid configuration for two out-of-the box connectors: Slack and Webhook.
xpack.actions.preconfigured:
my-slack1:
actionTypeId: .slack
name: 'Slack #xyz'
secrets:
webhookUrl: 'https://hooks.slack.com/services/abcd/efgh/ijklmnopqrstuvwxyz'
webhook-service:
actionTypeId: .webhook
name: 'Email service'
config:
url: 'https://email-alert-service.elastic.co'
method: post
headers:
header1: value1
header2: value2
secrets:
user: elastic
password: changeme
The key is the action connector identifier, | |
| |
| |
| |
|
Sensitive properties, such as passwords, can also be stored in the Kibana keystore.
When you open the menu, then go to Stack Management > Kibana > Alerts and Actions, preconfigured connectors appear on the Connectors tab, regardless of which space you are in. They are tagged as “preconfigured”, and you cannot delete them.
Clicking a preconfigured connector shows the description, but not the configuration. A message indicates that this is a preconfigured connector.
The connector details preview is disabled for preconfigured connectors of a preconfigured action type.
Preconfigured action type
This example shows a preconfigured action type with one out-of-the box connector.
xpack.actions.enabledActionTypes: ['.slack', '.email', '.index']
xpack.actions.preconfigured:
my-server-log:
actionTypeId: .server-log
name: 'Server log #xyz'
| |
|
To attach a preconfigured action to an alert:
- Open the menu, then go to Stack Management > Kibana > Alerts and Actions, open the Connectors tab.
- Click Create connector.
In the list of available action types, select the preconfigured action type you want.
In Create alert, open the connector dropdown, and then select the preconfigured connector.
The
preconfigured
label distinguishes it from a space-aware connector.Click Add action.