mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
# Backport This will backport the following commits from `main` to `8.7`: - [[DOCS] Automate screenshots in tracking containment rule (#153406)](https://github.com/elastic/kibana/pull/153406) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Lisa Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2023-03-22T14:51:16Z","message":"[DOCS] Automate screenshots in tracking containment rule (#153406)","sha":"cc11df727ffa1bc6335e6536150df406301f6a27","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","docs","Feature:Alerting/RuleTypes","v8.7.0","v8.8.0"],"number":153406,"url":"https://github.com/elastic/kibana/pull/153406","mergeCommit":{"message":"[DOCS] Automate screenshots in tracking containment rule (#153406)","sha":"cc11df727ffa1bc6335e6536150df406301f6a27"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/153406","number":153406,"mergeCommit":{"message":"[DOCS] Automate screenshots in tracking containment rule (#153406)","sha":"cc11df727ffa1bc6335e6536150df406301f6a27"}}]}] BACKPORT--> Co-authored-by: Lisa Cawley <lcawley@elastic.co>
This commit is contained in:
parent
11a8620c5e
commit
a19d14255d
6 changed files with 60 additions and 15 deletions
Binary file not shown.
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 45 KiB |
Binary file not shown.
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 84 KiB |
|
@ -88,4 +88,4 @@ they are not visible in *{stack-manage-app} > {rules-ui}*.
|
|||
|
||||
include::rule-types/index-threshold.asciidoc[leveloffset=+1]
|
||||
include::rule-types/es-query.asciidoc[leveloffset=+1]
|
||||
include::rule-types/geo-rule-types.asciidoc[]
|
||||
include::rule-types/geo-rule-types.asciidoc[leveloffset=+1]
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
[role="xpack"]
|
||||
[[geo-alerting]]
|
||||
=== Tracking containment
|
||||
== Tracking containment
|
||||
|
||||
<<maps, Maps>> offers the Tracking containment rule type which runs an {es} query over indices to determine whether any
|
||||
<<maps, Maps>> offers the tracking containment rule type which runs an {es} query over indices to determine whether any
|
||||
documents are currently contained within any boundaries from the specified boundary index.
|
||||
In the event that an entity is contained within a boundary, an alert may be generated.
|
||||
|
||||
[float]
|
||||
==== Requirements
|
||||
To create a Tracking containment rule, the following requirements must be present:
|
||||
=== Requirements
|
||||
To create a tracking containment rule, the following requirements must be present:
|
||||
|
||||
- *Tracks index or data view*: An index containing a `geo_point` field, `date` field,
|
||||
and some form of entity identifier. An entity identifier is a `keyword` or `number`
|
||||
|
@ -27,17 +27,14 @@ than the current time minus the amount of the interval. If data older than
|
|||
`now - <current interval>` is ingested, it won't trigger a rule.
|
||||
|
||||
[float]
|
||||
==== Create the rule
|
||||
=== Rule conditions
|
||||
|
||||
Fill in the name and optional tags, then select Tracking containment.
|
||||
|
||||
[float]
|
||||
==== Define the conditions
|
||||
Tracking containment rules have 3 clauses that define the condition to detect,
|
||||
as well as 2 Kuery bars used to provide additional filtering context for each of the indices.
|
||||
Tracking containment rules have three clauses that define the condition to detect,
|
||||
as well as two Kuery bars used to provide additional filtering context for each of the indices.
|
||||
|
||||
[role="screenshot"]
|
||||
image::user/alerting/images/alert-types-tracking-containment-conditions.png[Five clauses define the condition to detect]
|
||||
image::user/alerting/images/alert-types-tracking-containment-conditions.png[Define the condition to detect,width=75%]
|
||||
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
|
||||
|
||||
Index (entity):: This clause requires an *index or data view*, a *time field* that will be used for the *time window*, and a *`geo_point` field* for tracking.
|
||||
When entity:: This clause specifies which crossing option to track. The values
|
||||
|
@ -50,11 +47,12 @@ identifying boundaries, and an optional *Human-readable boundary name* for bette
|
|||
messages.
|
||||
|
||||
[float]
|
||||
==== Add action
|
||||
=== Actions
|
||||
|
||||
Conditions for how a rule is tracked can be specified uniquely for each individual action.
|
||||
A rule can be triggered either when a containment condition is met or when an entity
|
||||
is no longer contained.
|
||||
|
||||
[role="screenshot"]
|
||||
image::user/alerting/images/alert-types-tracking-containment-action-options.png[Five clauses define the condition to detect]
|
||||
image::user/alerting/images/alert-types-tracking-containment-action-options.png[Action frequency options for an action,width=75%]
|
||||
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
|
||||
|
|
|
@ -31,5 +31,6 @@ export default function ({ loadTestFile, getService }: FtrProviderContext) {
|
|||
loadTestFile(require.resolve('./list_view'));
|
||||
loadTestFile(require.resolve('./connector_types'));
|
||||
loadTestFile(require.resolve('./index_threshold_rule'));
|
||||
loadTestFile(require.resolve('./tracking_containment_rule'));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const commonScreenshots = getService('commonScreenshots');
|
||||
const rules = getService('rules');
|
||||
const testSubjects = getService('testSubjects');
|
||||
const pageObjects = getPageObjects(['common', 'header']);
|
||||
const screenshotDirectories = ['response_ops_docs', 'stack_alerting'];
|
||||
|
||||
describe('tracking containment rule', function () {
|
||||
it('create rule screenshot', async () => {
|
||||
await pageObjects.common.navigateToApp('triggersActions');
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await rules.common.clickCreateAlertButton();
|
||||
await testSubjects.click('solutionsFilterButton');
|
||||
await testSubjects.click('solutionstackAlertsFilterOption');
|
||||
await testSubjects.setValue('solutionsFilterButton', 'solutionstackAlertsFilterOption');
|
||||
await testSubjects.click('.geo-containment-SelectOption');
|
||||
await commonScreenshots.takeScreenshot(
|
||||
'alert-types-tracking-containment-conditions',
|
||||
screenshotDirectories,
|
||||
1400,
|
||||
1024
|
||||
);
|
||||
|
||||
await testSubjects.click('.server-log-alerting-ActionTypeSelectOption');
|
||||
await testSubjects.scrollIntoView('addAlertActionButton');
|
||||
const runWhen = await testSubjects.find('addNewActionConnectorActionGroup-0');
|
||||
await runWhen.click();
|
||||
await commonScreenshots.takeScreenshot(
|
||||
'alert-types-tracking-containment-action-options',
|
||||
screenshotDirectories,
|
||||
1400,
|
||||
1024
|
||||
);
|
||||
await testSubjects.click('cancelSaveRuleButton');
|
||||
});
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue