Skip to content

Commit

Permalink
Merge branch 'main' into d4c_telemetry_whitelist_additions
Browse files Browse the repository at this point in the history
  • Loading branch information
pjhampton authored May 17, 2023
2 parents 8ffd7e2 + 70407d6 commit 6557aa4
Show file tree
Hide file tree
Showing 44 changed files with 397 additions and 737 deletions.
135 changes: 1 addition & 134 deletions api_docs/observability.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -12065,124 +12065,6 @@
}
]
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin",
"type": "Object",
"tags": [],
"label": "[profilingElasticsearchPlugin]",
"description": [],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.category",
"type": "Array",
"tags": [],
"label": "category",
"description": [],
"signature": [
"string[]"
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.name",
"type": "Any",
"tags": [],
"label": "name",
"description": [],
"signature": [
"any"
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.description",
"type": "Any",
"tags": [],
"label": "description",
"description": [],
"signature": [
"any"
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.schema",
"type": "Object",
"tags": [],
"label": "schema",
"description": [],
"signature": [
{
"pluginId": "@kbn/config-schema",
"scope": "common",
"docId": "kibKbnConfigSchemaPluginApi",
"section": "def-common.Type",
"text": "Type"
},
"<boolean>"
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.value",
"type": "boolean",
"tags": [],
"label": "value",
"description": [],
"signature": [
"true"
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.requiresPageReload",
"type": "boolean",
"tags": [],
"label": "requiresPageReload",
"description": [],
"signature": [
"true"
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.profilingElasticsearchPlugin.type",
"type": "string",
"tags": [],
"label": "type",
"description": [],
"signature": [
"\"boolean\""
],
"path": "x-pack/plugins/observability/server/ui_settings.ts",
"deprecated": false,
"trackAdoption": false
}
]
},
{
"parentPluginId": "observability",
"id": "def-server.uiSettings.syntheticsThrottlingEnabled",
Expand Down Expand Up @@ -13185,21 +13067,6 @@
"trackAdoption": false,
"initialIsOpen": false
},
{
"parentPluginId": "observability",
"id": "def-common.profilingElasticsearchPlugin",
"type": "string",
"tags": [],
"label": "profilingElasticsearchPlugin",
"description": [],
"signature": [
"\"observability:profilingElasticsearchPlugin\""
],
"path": "x-pack/plugins/observability/common/ui_settings_keys.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
},
{
"parentPluginId": "observability",
"id": "def-common.ruleDetailsLocatorID",
Expand Down Expand Up @@ -13536,4 +13403,4 @@
],
"objects": []
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions docs/management/maintenance-windows/maintenance-windows.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[[maintenance-windows]]
== Maintenance windows
:description: Maintenance windows enable you to suppress rule notifications.
:tags-products: [kibana, alerting]
:tags-content-type: [overview]
:tags-user-goals: [manage]

preview::[]

You can schedule single or recurring maintenance windows to temporarily reduce rule notifications.
For example, a maintenance window prevents false alarms during planned outages.

Maintenance windows affect all rules in all {kib} apps and spaces.
Alerts continue to be generated, however notifications are suppressed as follows:

- When an alert occurs during a maintenance window, there are no notifications.
When the alert recovers, there are no notifications--even if the recovery occurs after the maintenance window ends.
- When an alert occurs before a maintenance window and recovers during or after the maintenance window, notifications are sent as usual.

[discrete]
[[setup-maintenance-windows]]
== Configure access to maintenance windows

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.

For more details, refer to <<kibana-privileges>>.

[discrete]
[[manage-maintenance-windows]]
== Create and manange maintenance windows

In *Management > {stack-manage-app} > Maintenance Windows*, you can create, edit, and archive maintenance windows.

When you create a maintenance window, you must provide a name and a schedule.
You can optionally configure it to repeat daily, monthly, yearly, or on a custom interval.

[role="screenshot"]
image::images/create-maintenance-window.png[The Create Maintenance Window user interface in {kib}]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.

A maintenance window can have any one of the following statuses:

- `Upcoming`: It will run at the scheduled date and time.
- `Running`: It is running.
- `Finished`: It ended and does not have a repeat schedule.
- `Archived`: It is archived. In a future release, archived maintenance windows will be queued for deletion.
1 change: 1 addition & 0 deletions docs/user/alerting/create-and-manage-rules.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ image:images/snooze-panel.png[Snooze notifications for a rule]
When a rule is in a snoozed state, you can cancel or change the duration of
this state.

preview:[] To temporarily suppress notifications for _all_ rules, create a <<maintenance-windows,maintenance window>>.

[float]
[[importing-and-exporting-rules]]
Expand Down
5 changes: 5 additions & 0 deletions docs/user/management.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ Viewer or Anomaly Explorer to see your {anomaly-detect} results.
For example, you might create an alert when the maximum total CPU usage on a machine goes
above a certain percentage.

| <<maintenance-windows,Maintenance windows>>
| Suppress rule notifications for scheduled periods of time.

|===

[float]
Expand Down Expand Up @@ -184,6 +187,8 @@ include::{kib-repo-dir}/management/action-types.asciidoc[]

include::{kib-repo-dir}/management/managing-licenses.asciidoc[]

include::{kib-repo-dir}/management/maintenance-windows/maintenance-windows.asciidoc[]

include::{kib-repo-dir}/management/manage-data-views.asciidoc[]

include::{kib-repo-dir}/management/numeral.asciidoc[]
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
indexAction: `${KIBANA_DOCS}index-action-type.html`,
esQuery: `${KIBANA_DOCS}rule-type-es-query.html`,
indexThreshold: `${KIBANA_DOCS}rule-type-index-threshold.html`,
maintenanceWindows: `${KIBANA_DOCS}maintenance-windows.html`,
pagerDutyAction: `${KIBANA_DOCS}pagerduty-action-type.html`,
preconfiguredConnectors: `${KIBANA_DOCS}pre-configured-connectors.html`,
preconfiguredAlertHistoryConnector: `${KIBANA_DOCS}index-action-type.html#preconfigured-connector-alert-history`,
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ export interface DocLinks {
indexAction: string;
esQuery: string;
indexThreshold: string;
maintenanceWindows: string;
pagerDutyAction: string;
preconfiguredConnectors: string;
preconfiguredAlertHistoryConnector: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import { memoize } from 'lodash';

import dateMath from '@kbn/datemath';
import { CoreStart } from '@kbn/core/public';
import { getEsQueryConfig } from '@kbn/data-plugin/common';
import { buildEsQuery, type TimeRange } from '@kbn/es-query';
import { KibanaPluginServiceFactory } from '@kbn/presentation-util-plugin/public';

Expand All @@ -24,10 +26,12 @@ import { ControlsPluginStartDeps } from '../../types';
import { ControlsOptionsListService } from './types';

class OptionsListService implements ControlsOptionsListService {
private core: CoreStart;
private data: ControlsDataService;
private http: ControlsHTTPService;

constructor(requiredServices: OptionsListServiceRequiredServices) {
constructor(core: CoreStart, requiredServices: OptionsListServiceRequiredServices) {
this.core = core;
({ data: this.data, http: this.http } = requiredServices);
}

Expand Down Expand Up @@ -85,7 +89,8 @@ class OptionsListService implements ControlsOptionsListService {
const { query, filters, dataView, timeRange, field, ...passThroughProps } = request;
const timeFilter = timeRange ? timeService.createFilter(dataView, timeRange) : undefined;
const filtersToUse = [...(filters ?? []), ...(timeFilter ? [timeFilter] : [])];
const esFilters = [buildEsQuery(dataView, query ?? [], filtersToUse ?? [])];
const config = getEsQueryConfig(this.core.uiSettings);
const esFilters = [buildEsQuery(dataView, query ?? [], filtersToUse ?? [], config)];

return {
...passThroughProps,
Expand Down Expand Up @@ -145,5 +150,5 @@ export type OptionsListServiceFactory = KibanaPluginServiceFactory<
>;

export const optionsListServiceFactory: OptionsListServiceFactory = (core, requiredServices) => {
return new OptionsListService(requiredServices);
return new OptionsListService(core.coreStart, requiredServices);
};
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,6 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
type: 'integer',
_meta: { description: 'Non-default value of setting.' },
},
'observability:profilingElasticsearchPlugin': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'banners:placement': {
type: 'keyword',
_meta: { description: 'Non-default value of setting.' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export interface UsageStats {
'observability:apmAWSLambdaRequestCostPerMillion': number;
'observability:enableInfrastructureHostsView': boolean;
'observability:apmAgentExplorerView': boolean;
'observability:profilingElasticsearchPlugin': boolean;
'visualize:enableLabs': boolean;
'visualization:heatmap:maxBuckets': number;
'visualization:colorMapping': string;
Expand Down
6 changes: 0 additions & 6 deletions src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -9196,12 +9196,6 @@
"description": "Non-default value of setting."
}
},
"observability:profilingElasticsearchPlugin": {
"type": "boolean",
"_meta": {
"description": "Non-default value of setting."
}
},
"banners:placement": {
"type": "keyword",
"_meta": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const EmptyPrompt = React.memo<EmptyPromptProps>(
<EuiButtonEmpty
key="documentation-button"
target="_blank"
href={docLinks.alerting.guide}
href={docLinks.alerting.maintenanceWindows}
iconType="help"
>
{i18n.EMPTY_PROMPT_DOCUMENTATION}
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/observability/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export {
apmEnableServiceMetrics,
apmEnableContinuousRollups,
enableCriticalPath,
profilingElasticsearchPlugin,
syntheticsThrottlingEnabled,
} from './ui_settings_keys';

Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/observability/common/ui_settings_keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ export const apmAWSLambdaRequestCostPerMillion = 'observability:apmAWSLambdaRequ
export const enableCriticalPath = 'observability:apmEnableCriticalPath';
export const apmEnableServiceMetrics = 'observability:apmEnableServiceMetrics';
export const apmEnableContinuousRollups = 'observability:apmEnableContinuousRollups';
export const profilingElasticsearchPlugin = 'observability:profilingElasticsearchPlugin';
export const syntheticsThrottlingEnabled = 'observability:syntheticsThrottlingEnabled';
18 changes: 0 additions & 18 deletions x-pack/plugins/observability/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
apmEnableContinuousRollups,
enableCriticalPath,
enableInfrastructureHostsView,
profilingElasticsearchPlugin,
syntheticsThrottlingEnabled,
} from '../common/ui_settings_keys';

Expand Down Expand Up @@ -338,23 +337,6 @@ export const uiSettings: Record<string, UiSettings> = {
type: 'boolean',
showInLabs: true,
},
[profilingElasticsearchPlugin]: {
category: [observabilityFeatureId],
name: i18n.translate('xpack.observability.profilingElasticsearchPlugin', {
defaultMessage: 'Use Elasticsearch profiler plugin',
}),
description: i18n.translate('xpack.observability.profilingElasticsearchPluginDescription', {
defaultMessage:
'{technicalPreviewLabel} Whether to load stacktraces using Elasticsearch profiler plugin.',
values: {
technicalPreviewLabel: `<em>[${technicalPreviewLabel}]</em>`,
},
}),
schema: schema.boolean(),
value: true,
requiresPageReload: true,
type: 'boolean',
},
[syntheticsThrottlingEnabled]: {
category: [observabilityFeatureId],
name: i18n.translate('xpack.observability.syntheticsThrottlingEnabledExperimentName', {
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/profiling/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ export function getRoutePaths() {
TopNThreads: `${BASE_ROUTE_PATH}/topn/threads`,
TopNTraces: `${BASE_ROUTE_PATH}/topn/traces`,
Flamechart: `${BASE_ROUTE_PATH}/flamechart`,
CacheExecutables: `${BASE_ROUTE_PATH}/cache/executables`,
CacheStackFrames: `${BASE_ROUTE_PATH}/cache/stackframes`,
HasSetupESResources: `${BASE_ROUTE_PATH}/setup/es_resources`,
HasSetupDataCollection: `${BASE_ROUTE_PATH}/setup/has_data`,
SetupDataCollectionInstructions: `${BASE_ROUTE_PATH}/setup/instructions`,
Expand Down
Loading

0 comments on commit 6557aa4

Please sign in to comment.