mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
[RAM][[Maintenance Window][DOCS] Maintenance window scoped query automated screenshots (#174315)
This commit is contained in:
parent
edb2439812
commit
02ea9192f7
8 changed files with 105 additions and 2 deletions
Binary file not shown.
After Width: | Height: | Size: 136 KiB |
Binary file not shown.
Before Width: | Height: | Size: 209 KiB After Width: | Height: | Size: 254 KiB |
|
@ -25,7 +25,7 @@ When the alert recovers, there are no notifications--even if the recovery occurs
|
|||
To use maintenance windows, you must have the appropriate {subscriptions}[subscription] and {kib} feature privileges.
|
||||
|
||||
- To have full access to maintenance windows, you must have `All` privileges for the *Management > Maintenance Windows* feature.
|
||||
- To have view-only access to maintenance windows, you must have `Read` privileges for the **Management > Maintenance Windows* feature.
|
||||
- To have view-only access to maintenance windows, you must have `Read` privileges for the *Management > Maintenance Windows* feature.
|
||||
|
||||
For more details, refer to <<kibana-privileges>>.
|
||||
|
||||
|
@ -46,6 +46,18 @@ By default, maintenance windows affect all categories of rules.
|
|||
The category-specific maintenance window options alter this behavior.
|
||||
For the definitive list of rule types in each category, refer to the <<list-rule-types-api,get rule types API>>.
|
||||
|
||||
If you turn on *Filter alerts*, you can use KQL to filter the alerts affected by the maintenance window:
|
||||
|
||||
[role="screenshot"]
|
||||
image::images/create-maintenance-window-filter.png[The Create Maintenance Window user interface in {kib} with alert filters turned on]
|
||||
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
* You can select only a single category when you turn on filters.
|
||||
* Some rules are not affected by maintenance window filters because their alerts do not contain requisite data. In particular, <<kibana-alerts,{stack-monitor-app}>>, <<geo-alerting,tracking containment>>, {ml-docs}/ml-configuring-alerts.html[{anomaly-jobs} health], and {ref}/transform-alerts.html[transform health] rules are not affected by the filters.
|
||||
====
|
||||
|
||||
A maintenance window can have any one of the following statuses:
|
||||
|
||||
- `Upcoming`: It will run at the scheduled date and time.
|
||||
|
|
|
@ -26,7 +26,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
'create-maintenance-window',
|
||||
screenshotDirectories,
|
||||
1400,
|
||||
1024
|
||||
1600
|
||||
);
|
||||
const filterAlerts = await find.byCssSelector(
|
||||
'[data-test-subj="maintenanceWindowScopedQuerySwitch"] .euiSwitch__button'
|
||||
);
|
||||
await filterAlerts.click();
|
||||
await commonScreenshots.takeScreenshot(
|
||||
'create-maintenance-window-filter',
|
||||
screenshotDirectories,
|
||||
1400,
|
||||
1600
|
||||
);
|
||||
const cancelButton = await testSubjects.find('cancelMaintenanceWindow');
|
||||
await cancelButton.click();
|
||||
|
|
|
@ -107,6 +107,9 @@ export function createTestConfig(options: CreateTestConfigOptions) {
|
|||
pathname: '/app/dev_tools',
|
||||
hash: '/searchprofiler',
|
||||
},
|
||||
maintenanceWindows: {
|
||||
pathname: '/app/management/insightsAndAlerting/maintenanceWindows',
|
||||
},
|
||||
},
|
||||
// choose where screenshots should be saved
|
||||
screenshots: {
|
||||
|
|
|
@ -27,5 +27,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
|
|||
|
||||
loadTestFile(require.resolve('./cases'));
|
||||
loadTestFile(require.resolve('./connectors'));
|
||||
loadTestFile(require.resolve('./maintenance_windows'));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* 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 ({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const pageObjects = getPageObjects(['common', 'header', 'svlCommonPage']);
|
||||
const svlCommonScreenshots = getService('svlCommonScreenshots');
|
||||
const screenshotDirectories = ['response_ops_docs', 'observability_maintenace_windows'];
|
||||
const find = getService('find');
|
||||
const testSubjects = getService('testSubjects');
|
||||
|
||||
describe('create window', function () {
|
||||
beforeEach(async () => {
|
||||
await pageObjects.svlCommonPage.login();
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await pageObjects.svlCommonPage.forceLogout();
|
||||
});
|
||||
|
||||
it('create maintenance window screenshot', async () => {
|
||||
await pageObjects.common.navigateToApp('maintenanceWindows');
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
const createButton = await find.byCssSelector(
|
||||
'[data-test-subj="mw-empty-prompt"] .euiButton'
|
||||
);
|
||||
await createButton.click();
|
||||
await svlCommonScreenshots.takeScreenshot(
|
||||
'create-maintenance-window',
|
||||
screenshotDirectories,
|
||||
1400,
|
||||
1600
|
||||
);
|
||||
const filterAlerts = await find.byCssSelector(
|
||||
'[data-test-subj="maintenanceWindowScopedQuerySwitch"] .euiSwitch__button'
|
||||
);
|
||||
await filterAlerts.click();
|
||||
const radioGroup = await testSubjects.find('maintenanceWindowCategorySelectionRadioGroup');
|
||||
const label = await radioGroup.findByCssSelector(`label[for="observability"]`);
|
||||
await label.click();
|
||||
await testSubjects.setValue('queryInput', 'kibana.alert.rule.name: custom-threshold-rule-1');
|
||||
await svlCommonScreenshots.takeScreenshot(
|
||||
'create-maintenance-window-filter',
|
||||
screenshotDirectories,
|
||||
1400,
|
||||
1600
|
||||
);
|
||||
const cancelButton = await testSubjects.find('cancelMaintenanceWindow');
|
||||
await cancelButton.click();
|
||||
});
|
||||
});
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* 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 ({ loadTestFile, getService }: FtrProviderContext) {
|
||||
const browser = getService('browser');
|
||||
|
||||
describe('observability maintenance windows', function () {
|
||||
before(async () => {
|
||||
await browser.setWindowSize(1920, 1080);
|
||||
});
|
||||
|
||||
loadTestFile(require.resolve('./create_window'));
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue