Skip to content

Commit a55bdff

Browse files
committed
[DOCS] Updates Watcher examples for code testing (#31152)
1 parent aa6425f commit a55bdff

33 files changed

+110
-41
lines changed

x-pack/docs/build.gradle

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,6 @@ buildRestTests.expectedUnconvertedCandidates = [
1414
'en/security/authorization/run-as-privilege.asciidoc',
1515
'en/security/tribe-clients-integrations/http.asciidoc',
1616
'en/security/authorization/custom-roles-provider.asciidoc',
17-
'en/watcher/actions/email.asciidoc',
18-
'en/watcher/actions/hipchat.asciidoc',
19-
'en/watcher/actions/index.asciidoc',
20-
'en/watcher/actions/logging.asciidoc',
21-
'en/watcher/actions/pagerduty.asciidoc',
22-
'en/watcher/actions/slack.asciidoc',
23-
'en/watcher/actions/jira.asciidoc',
24-
'en/watcher/actions/webhook.asciidoc',
25-
'en/watcher/condition/always.asciidoc',
26-
'en/watcher/condition/array-compare.asciidoc',
27-
'en/watcher/condition/compare.asciidoc',
28-
'en/watcher/condition/never.asciidoc',
29-
'en/watcher/condition/script.asciidoc',
30-
'en/watcher/customizing-watches.asciidoc',
31-
'en/watcher/example-watches/example-watch-meetupdata.asciidoc',
32-
'en/watcher/how-watcher-works.asciidoc',
33-
'en/watcher/input/chain.asciidoc',
34-
'en/watcher/input/http.asciidoc',
35-
'en/watcher/input/search.asciidoc',
36-
'en/watcher/input/simple.asciidoc',
37-
'en/watcher/transform.asciidoc',
38-
'en/watcher/transform/chain.asciidoc',
39-
'en/watcher/transform/script.asciidoc',
40-
'en/watcher/transform/search.asciidoc',
41-
'en/watcher/trigger/schedule/cron.asciidoc',
42-
'en/watcher/trigger/schedule/daily.asciidoc',
43-
'en/watcher/trigger/schedule/hourly.asciidoc',
44-
'en/watcher/trigger/schedule/interval.asciidoc',
45-
'en/watcher/trigger/schedule/monthly.asciidoc',
46-
'en/watcher/trigger/schedule/weekly.asciidoc',
47-
'en/watcher/trigger/schedule/yearly.asciidoc',
48-
'en/watcher/troubleshooting.asciidoc',
4917
'en/rest-api/ml/delete-snapshot.asciidoc',
5018
'en/rest-api/ml/get-bucket.asciidoc',
5119
'en/rest-api/ml/get-job-stats.asciidoc',

x-pack/docs/en/watcher/actions/email.asciidoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ the watch payload in the email body:
3535
}
3636
}
3737
--------------------------------------------------
38+
// NOTCONSOLE
3839
<1> The id of the action.
3940
<2> The action type is set to `email`.
4041
<3> One or more addresses to send the email to. Must be specified in the
@@ -92,6 +93,7 @@ killed by firewalls or load balancers inbetween.
9293
}
9394
}
9495
--------------------------------------------------
96+
// NOTCONSOLE
9597
<1> The ID of the attachment, which is used as the file name in the email
9698
attachment.
9799
<2> The type of the attachment and its specific configuration.
@@ -158,9 +160,8 @@ include::{kib-repo-dir}/reporting/watch-example.asciidoc[]
158160

159161
include::{kib-repo-dir}/reporting/report-intervals.asciidoc[]
160162

161-
//TODO: RE-ADD LINK:
162-
//For more information, see
163-
//{kibana-ref}/automating-report-generation.html[Automating Report Generation].
163+
For more information, see
164+
{kibana-ref}/automating-report-generation.html[Automating Report Generation].
164165

165166
[[email-action-attributes]]
166167
==== Email Action Attributes

x-pack/docs/en/watcher/actions/hipchat.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ attribute is the message itself:
3737
}
3838
}
3939
--------------------------------------------------
40+
// NOTCONSOLE
4041
<1> The name of a HipChat account configured in `elasticsearch.yml`.
4142
<2> The message you want to send to HipChat.
4243

@@ -66,6 +67,7 @@ For example, the following action is configured to send messages to the
6667
}
6768
}
6869
--------------------------------------------------
70+
// NOTCONSOLE
6971

7072
To send messages with a HipChat account that uses the <<hipchat-api-v1, v1>>
7173
profile, you need to specify what room or rooms you want to send the message to.
@@ -92,7 +94,7 @@ For example, the following action is configured to send messages to the
9294
}
9395
}
9496
--------------------------------------------------
95-
97+
// NOTCONSOLE
9698

9799
[[hipchat-action-attributes]]
98100
==== HipChat Action Attributes

x-pack/docs/en/watcher/actions/index.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ The following snippet shows a simple `index` action definition:
2222
}
2323
}
2424
--------------------------------------------------
25+
// NOTCONSOLE
2526
<1> The id of the action
2627
<2> An optional <<condition, condition>> to restrict action execution
2728
<3> An optional <<transform, transform>> to transform the payload and prepare the data that should be indexed

x-pack/docs/en/watcher/actions/jira.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ The following snippet shows a simple jira action definition:
4040
}
4141
}
4242
--------------------------------------------------
43+
// NOTCONSOLE
4344
<1> The name of a Jira account configured in `elasticsearch.yml`.
4445
<2> The key of the Jira project in which the issue will be created.
4546
<3> The name of the issue type.

x-pack/docs/en/watcher/actions/logging.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The following snippet shows a simple logging action definition:
2525
}
2626
}
2727
--------------------------------------------------
28+
// NOTCONSOLE
2829
<1> The id of the action.
2930
<2> An optional <<transform, transform>> to transform the payload before
3031
executing the `logging` action.

x-pack/docs/en/watcher/actions/pagerduty.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The following snippet shows a simple PagerDuty action definition:
2525
}
2626
}
2727
--------------------------------------------------
28+
// NOTCONSOLE
2829
<1> Description of the message
2930

3031

@@ -59,6 +60,7 @@ payload as well as an array of contexts to the action.
5960
}
6061
}
6162
--------------------------------------------------
63+
// NOTCONSOLE
6264

6365

6466
[[pagerduty-action-attributes]]

x-pack/docs/en/watcher/actions/slack.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The following snippet shows a simple slack action definition:
2929
}
3030
}
3131
--------------------------------------------------
32+
// NOTCONSOLE
3233
<1> The channels and users you want to send the message to.
3334
<2> The content of the message.
3435

@@ -66,6 +67,7 @@ The following snippet shows a standard message attachment:
6667
}
6768
}
6869
--------------------------------------------------
70+
// NOTCONSOLE
6971

7072
[[slack-dynamic-attachment]]
7173

@@ -131,6 +133,7 @@ aggregation and the Slack action:
131133
}
132134
}
133135
--------------------------------------------------
136+
// NOTCONSOLE
134137
<1> The list generated by the action's transform.
135138
<2> The parameter placeholders refer to attributes in each item of the list
136139
generated by the transform.

x-pack/docs/en/watcher/actions/webhook.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The following snippet shows a simple webhook action definition:
3030
}
3131
}
3232
--------------------------------------------------
33+
// NOTCONSOLE
3334
<1> The id of the action
3435
<2> An optional <<transform, transform>> to transform the payload before
3536
executing the `webhook` action
@@ -65,6 +66,7 @@ For example, the following `webhook` action creates a new issue in GitHub:
6566
}
6667
}
6768
--------------------------------------------------
69+
// NOTCONSOLE
6870
<1> The username and password for the user creating the issue
6971

7072
NOTE: By default, both the username and the password are stored in the `.watches`
@@ -101,6 +103,7 @@ the values serve as the parameter values:
101103
}
102104
}
103105
--------------------------------------------------
106+
// NOTCONSOLE
104107
<1> The parameter values can contain templated strings.
105108

106109

@@ -128,6 +131,7 @@ the values serve as the header values:
128131
}
129132
}
130133
--------------------------------------------------
134+
// NOTCONSOLE
131135
<1> The header values can contain templated strings.
132136

133137

x-pack/docs/en/watcher/condition/always.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ object:
2222
"always" : {}
2323
}
2424
--------------------------------------------------
25+
// NOTCONSOLE

0 commit comments

Comments
 (0)