mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[DOCS] Fix docs and screenshots for rule creation changes (#181925)
This commit is contained in:
parent
6dab9ae6fe
commit
06e147e021
9 changed files with 26 additions and 53 deletions
Binary file not shown.
Before Width: | Height: | Size: 107 KiB |
|
@ -12,7 +12,8 @@ The {es} query rule type runs a user-configured query, compares the number of
|
|||
matches to a configured threshold, and schedules actions to run when the
|
||||
threshold condition is met.
|
||||
|
||||
In *{stack-manage-app}* > *{rules-ui}*, click *Create rule*, fill in the name and optional tags, then select *{es} query*.
|
||||
In *{stack-manage-app}* > *{rules-ui}*, click *Create rule*.
|
||||
Select the *{es} query* rule type then fill in the name and optional tags.
|
||||
An {es} query rule can be defined using {es} Query Domain Specific Language (DSL), {es} Query Language (ES|QL), {kib} Query Language (KQL), or Lucene.
|
||||
|
||||
[float]
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
|
||||
The tracking containment rule alerts when an entity is contained or no longer contained within a boundary.
|
||||
|
||||
In *{stack-manage-app}* > *{rules-ui}*, click *Create rule*, fill in the name and optional tags, then select *Tracking containment*.
|
||||
In *{stack-manage-app}* > *{rules-ui}*, click *Create rule*.
|
||||
Select the *Tracking containment* rule type then fill in the name and optional tags.
|
||||
|
||||
[float]
|
||||
=== Define the conditions
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
|
||||
The index threshold rule type runs an {es} query. It aggregates field values from documents, compares them to threshold values, and schedules actions to run when the thresholds are met.
|
||||
|
||||
In *{stack-manage-app}* > *{rules-ui}*, click *Create rule*, fill in the name and optional tags, then select *Index threshold*.
|
||||
In *{stack-manage-app}* > *{rules-ui}*, click *Create rule*.
|
||||
Select the *Index threshold* rule type then fill in the name and optional tags.
|
||||
|
||||
[float]
|
||||
=== Define the conditions
|
||||
|
@ -107,15 +108,11 @@ You can also specify <<rule-action-variables,variables common to all rules>>.
|
|||
|
||||
In this example, you will use the {kib} <<add-sample-data,sample weblog data set>> to set up and tune the conditions on an index threshold rule. For this example, you want to detect when any of the top four sites serve more than 420,000 bytes over a 24 hour period.
|
||||
|
||||
. Open the main menu, then click *{stack-manage-app} > {rules-ui}*.
|
||||
. Go to *{stack-manage-app} > {rules-ui}* and click *Create rule*.
|
||||
|
||||
. Create a new rule.
|
||||
. Select the **Index threshold** rule type.
|
||||
|
||||
.. Provide a rule name and select the **Index threshold** rule type.
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::user/alerting/images/rule-types-index-threshold-select.png[Choosing an index threshold rule type]
|
||||
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
|
||||
.. Provide a rule name.
|
||||
|
||||
.. Select an index. Click *Index*, and set *Indices to query* to `kibana_sample_data_logs`. Set the *Time field* to `@timestamp`.
|
||||
+
|
||||
|
|
|
@ -65,9 +65,8 @@ function createTestJobAndDatafeed() {
|
|||
export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
||||
const esArchiver = getService('esArchiver');
|
||||
const ml = getService('ml');
|
||||
const pageObjects = getPageObjects(['triggersActionsUI']);
|
||||
const pageObjects = getPageObjects(['triggersActionsUI', 'header']);
|
||||
const commonScreenshots = getService('commonScreenshots');
|
||||
const browser = getService('browser');
|
||||
const actions = getService('actions');
|
||||
const testSubjects = getService('testSubjects');
|
||||
|
||||
|
@ -105,16 +104,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
it('alert flyout screenshots', async () => {
|
||||
await ml.navigation.navigateToAlertsAndAction();
|
||||
await pageObjects.triggersActionsUI.clickCreateAlertButton();
|
||||
await ml.alerting.setRuleName('test-ecommerce');
|
||||
const searchBox = await testSubjects.find('ruleSearchField');
|
||||
await searchBox.click();
|
||||
await searchBox.clearValue();
|
||||
await searchBox.type('ml');
|
||||
await searchBox.pressKeys(browser.keys.ENTER);
|
||||
await ml.testExecution.logTestStep('take screenshot');
|
||||
await commonScreenshots.takeScreenshot('ml-rule', screenshotDirectories, 1920, 1400);
|
||||
|
||||
await ml.testExecution.logTestStep('Create anomaly detection jobs health rule');
|
||||
await ml.alerting.selectAnomalyDetectionJobHealthAlertType();
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await ml.alerting.setRuleName('test-ecommerce');
|
||||
await ml.alerting.selectJobs([testJobId]);
|
||||
await ml.testExecution.logTestStep('take screenshot');
|
||||
await commonScreenshots.takeScreenshot(
|
||||
|
@ -137,9 +130,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
);
|
||||
await ml.alerting.clickCancelSaveRuleButton();
|
||||
|
||||
await ml.testExecution.logTestStep('Create anomaly detection rule');
|
||||
await pageObjects.triggersActionsUI.clickCreateAlertButton();
|
||||
await ml.alerting.setRuleName('test-ecommerce');
|
||||
await ml.alerting.selectAnomalyDetectionAlertType();
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await ml.alerting.setRuleName('test-ecommerce');
|
||||
await ml.testExecution.logTestStep('should have correct default values');
|
||||
await ml.alerting.assertSeverity(75);
|
||||
await ml.alerting.assertPreviewButtonState(false);
|
||||
|
|
|
@ -37,8 +37,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await pageObjects.common.navigateToApp('triggersActions');
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await rules.common.clickCreateAlertButton();
|
||||
await testSubjects.setValue('ruleNameInput', ruleName);
|
||||
await testSubjects.click(`.es-query-SelectOption`);
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await testSubjects.setValue('ruleNameInput', ruleName);
|
||||
await testSubjects.click('queryFormType_esQuery');
|
||||
const indexSelector = await testSubjects.find('selectIndexExpression');
|
||||
await indexSelector.click();
|
||||
|
|
|
@ -23,27 +23,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await pageObjects.common.navigateToApp('triggersActions');
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await rules.common.clickCreateAlertButton();
|
||||
await testSubjects.setValue('ruleNameInput', ruleName);
|
||||
await testSubjects.click('tagsComboBox');
|
||||
await testSubjects.setValue('tagsComboBox', 'sample-data');
|
||||
await testSubjects.click('solutionsFilterButton');
|
||||
await testSubjects.click('solutionstackAlertsFilterOption');
|
||||
await testSubjects.setValue('solutionsFilterButton', 'solutionstackAlertsFilterOption');
|
||||
await commonScreenshots.takeScreenshot(
|
||||
'rule-types-index-threshold-select',
|
||||
screenshotDirectories,
|
||||
1400,
|
||||
1024
|
||||
);
|
||||
|
||||
await testSubjects.click('.index-threshold-SelectOption');
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await commonScreenshots.takeScreenshot(
|
||||
'rule-types-index-threshold-conditions',
|
||||
screenshotDirectories,
|
||||
1400,
|
||||
1300
|
||||
);
|
||||
|
||||
await testSubjects.setValue('ruleNameInput', ruleName);
|
||||
await testSubjects.click('tagsComboBox');
|
||||
await testSubjects.setValue('tagsComboBox', 'sample-data');
|
||||
await testSubjects.scrollIntoView('selectIndexExpression');
|
||||
await testSubjects.click('selectIndexExpression');
|
||||
await comboBox.set('thresholdIndexesComboBox', 'kibana_sample_data_logs ');
|
||||
|
|
|
@ -20,10 +20,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
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 pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await comboBox.setCustom('entitiesDataView', 'Kibana Sample Data Logs');
|
||||
await commonScreenshots.takeScreenshot(
|
||||
'alert-types-tracking-containment-conditions',
|
||||
|
|
|
@ -14,7 +14,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
const testSubjects = getService('testSubjects');
|
||||
const transform = getService('transform');
|
||||
const screenshotDirectories = ['transform_docs'];
|
||||
const pageObjects = getPageObjects(['triggersActionsUI']);
|
||||
const pageObjects = getPageObjects(['triggersActionsUI', 'header']);
|
||||
|
||||
let testTransformId = '';
|
||||
|
||||
|
@ -37,20 +37,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
|
|||
await transform.testExecution.logTestStep('navigate to stack management rules');
|
||||
await transform.navigation.navigateToRules();
|
||||
await pageObjects.triggersActionsUI.clickCreateAlertButton();
|
||||
await transform.alerting.setRuleName('transform-health-rule');
|
||||
|
||||
await transform.testExecution.logTestStep(
|
||||
'search for transform rule type and take screenshot'
|
||||
);
|
||||
const searchBox = await testSubjects.find('ruleSearchField');
|
||||
await searchBox.click();
|
||||
await searchBox.clearValue();
|
||||
await searchBox.type('transform');
|
||||
await searchBox.pressKeys(browser.keys.ENTER);
|
||||
await commonScreenshots.takeScreenshot('transform-rule', screenshotDirectories);
|
||||
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await transform.testExecution.logTestStep('select transform details and take screenshot');
|
||||
await transform.alerting.selectTransformAlertType();
|
||||
await transform.alerting.setRuleName('transform-health-rule');
|
||||
testTransformId = '*';
|
||||
await transform.alerting.selectTransforms([testTransformId]);
|
||||
await commonScreenshots.takeScreenshot('transform-check-config', screenshotDirectories);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue