Skip to content

Commit 055d1fb

Browse files
YulNaumenkogchaps
andauthored
[Alerting] Documentation for how to pre-configure connectors. (#63807)
* [Alerting] Documentation for how to pre-configure connectors. * small fix * Adjusted titles * Fixed wrong link * fixed warning * Fixed ci issues * [DOCS] Edits preconfigured connector docs * Replaced words 'pre-configured' with 'preconfigured' Co-authored-by: gchaps <chappell_5@yahoo.com>
1 parent 2e45234 commit 055d1fb

File tree

12 files changed

+109
-12
lines changed

12 files changed

+109
-12
lines changed

docs/user/alerting/action-types.asciidoc

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,23 @@ a| <<webhook-action-type, Webhook>>
3434

3535
[NOTE]
3636
==============================================
37-
Some action types are paid commercial features, while others are free.
38-
For a comparison of the Elastic subscription levels,
39-
see https://www.elastic.co/subscriptions[the subscription page].
37+
Some action types are paid commercial features, while others are free.
38+
For a comparison of the Elastic subscription levels,
39+
see https://www.elastic.co/subscriptions[the subscription page].
4040
==============================================
4141

42+
[float]
43+
[[create-connectors]]
44+
=== Connectors
45+
46+
You can create connectors for actions in <<managing-alerts-and-actions, Alerts and Actions>> or via the action API.
47+
For out-of-the-box and standardized connectors, you can <<pre-configured-connectors, preconfigure connectors>>
48+
before {kib} starts.
49+
4250
include::action-types/email.asciidoc[]
4351
include::action-types/index.asciidoc[]
4452
include::action-types/pagerduty.asciidoc[]
4553
include::action-types/server-log.asciidoc[]
4654
include::action-types/slack.asciidoc[]
4755
include::action-types/webhook.asciidoc[]
56+
include::pre-configured-connectors.asciidoc[]
90.1 KB
Loading
143 KB
Loading
190 KB
Loading
91.9 KB
Loading
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
[role="xpack"]
2+
[[pre-configured-connectors]]
3+
4+
== Preconfigured connectors
5+
6+
You can preconfigure an action connector to have all the information it needs prior to startup
7+
by adding it to the `kibana.yml` file.
8+
Sensitive configuration information, such as credentials, can use the {kib} keystore.
9+
10+
Preconfigured connectors offer the following capabilities:
11+
12+
- Require no setup. Configuration and credentials needed to execute an
13+
action are predefined, including the connector name and ID.
14+
- Appear in all spaces because they are not saved objects.
15+
- Cannot be edited or deleted.
16+
17+
[float]
18+
[[preconfigured-connector-example]]
19+
=== Example of a preconfigured connector
20+
21+
The following example shows a valid configuration 2 out-of-the box connector.
22+
23+
[source,console]
24+
------------------------
25+
xpack.actions.preconfigured:
26+
- id: 'my-slack1' <1>
27+
actionTypeId: .slack <2>
28+
name: 'Slack #xyz' <3>
29+
config: <4>
30+
webhookUrl: 'https://hooks.slack.com/services/abcd/efgh/ijklmnopqrstuvwxyz'
31+
- id: 'webhook-service'
32+
actionTypeId: .webhook
33+
name: 'Email service'
34+
config:
35+
url: 'https://email-alert-service.elastic.co'
36+
method: post
37+
headers:
38+
header1: value1
39+
header2: value2
40+
secrets: <5>
41+
user: elastic
42+
password: changeme
43+
------------------------
44+
45+
<1> `id` is the action connector identifier.
46+
<2> `actionTypeId` is the action type identifier.
47+
<3> `name` is the name of the preconfigured connector.
48+
<4> `config` is the action type specific to the configuration.
49+
<5> `secrets` is sensitive configuration, such as username, password, and keys.
50+
51+
[NOTE]
52+
==============================================
53+
Sensitive properties, such as passwords, can also be stored in the {kib} keystore.
54+
==============================================
55+
56+
[float]
57+
[[pre-configured-connector-alert-form]]
58+
=== Creating an alert with a preconfigured connector
59+
60+
When attaching an action to an alert,
61+
select from a list of available action types, and
62+
then select the Slack or Webhook type. Those action types were configured previously.
63+
The preconfigured connector is installed and is automatically selected.
64+
65+
[role="screenshot"]
66+
image::images/alert-pre-configured-slack-connector.png[Create alert with selected Slack action type]
67+
68+
The dropdown is populated with additional preconfigured Slack connectors.
69+
The `preconfigured` label distinguishes them from space-aware connectors that use saved objects.
70+
71+
[role="screenshot"]
72+
image::images/alert-pre-configured-connectors-dropdown.png[Dropdown list with pre-cofigured connectors]
73+
74+
[float]
75+
[[managing-pre-configured-connectors]]
76+
=== Managing preconfigured connectors
77+
78+
Preconfigured connectors appear in the connector list, regardless of which space the user is in.
79+
They are tagged as “preconfigured” and cannot be deleted.
80+
81+
[role="screenshot"]
82+
image::images/pre-configured-connectors-managing.png[Connectors managing tab with pre-cofigured]
83+
84+
Clicking on a preconfigured connector shows the description, but not any of the configuration.
85+
A message indicates that this is a preconfigured connector.
86+
87+
[role="screenshot"]
88+
image::images/pre-configured-connectors-view-screen.png[Pre-configured connector view details]

x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ describe('action_form', () => {
232232
Object {
233233
"id": "test2",
234234
"key": "test2",
235-
"label": "Test connector 2 (pre-configured)",
235+
"label": "Test connector 2 (preconfigured)",
236236
},
237237
]
238238
`);

x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export const ActionForm = ({
152152
const preconfiguredMessage = i18n.translate(
153153
'xpack.triggersActionsUI.sections.actionForm.preconfiguredTitleMessage',
154154
{
155-
defaultMessage: '(pre-configured)',
155+
defaultMessage: '(preconfigured)',
156156
}
157157
);
158158
const getSelectedOptions = (actionItemId: string) => {

x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_edit_flyout.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ describe('connector_edit_flyout', () => {
9696
expect(connectorNameField.first().prop('value')).toBe('action-connector');
9797
});
9898

99-
test('if pre-configured connector rendered correct in the edit form', () => {
99+
test('if preconfigured connector rendered correct in the edit form', () => {
100100
const connector = {
101101
secrets: {},
102102
id: 'test',
103103
actionTypeId: 'test-action-type-id',
104104
actionType: 'test-action-type-name',
105-
name: 'pre-configured-connector',
105+
name: 'preconfigured-connector',
106106
isPreconfigured: true,
107107
referencedByCount: 0,
108108
config: {},

x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_edit_flyout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const ConnectorEditFlyout = ({
104104
/>
105105
&emsp;
106106
<EuiBetaBadge
107-
label="Pre-configured"
107+
label="Preconfigured"
108108
data-test-subj="preconfiguredBadge"
109109
tooltipContent={i18n.translate(
110110
'xpack.triggersActionsUI.sections.preconfiguredConnectorForm.tooltipContent',
@@ -197,7 +197,7 @@ export const ConnectorEditFlyout = ({
197197
<EuiLink href="https://www.elastic.co/guide" target="_blank">
198198
<FormattedMessage
199199
id="xpack.triggersActionsUI.sections.editConnectorForm.preconfiguredHelpLabel"
200-
defaultMessage="Learn more about pre-configured connectors."
200+
defaultMessage="Learn more about preconfigured connectors."
201201
/>
202202
</EuiLink>
203203
</Fragment>

0 commit comments

Comments
 (0)