Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/elastic/kibana into alert…
Browse files Browse the repository at this point in the history
…ing/cancel-alerting-tasks
  • Loading branch information
ymao1 committed Oct 12, 2021
2 parents 7c6db75 + ef8cd68 commit cff64f1
Show file tree
Hide file tree
Showing 60 changed files with 1,753 additions and 539 deletions.
41 changes: 19 additions & 22 deletions docs/settings/general-infra-logs-ui-settings.asciidoc
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
[cols="2*<"]
|===
| `xpack.infra.enabled`
| deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
Set to `false` to disable the Logs and Metrics app plugin {kib}. Defaults to `true`.

| `xpack.infra.sources.default.logAlias`
| Index pattern for matching indices that contain log data. Defaults to `filebeat-*,kibana_sample_data_logs*`. To match multiple wildcard patterns, use a comma to separate the names, with no space after the comma. For example, `logstash-app1-*,default-logs-*`.
`xpack.infra.enabled`::
deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
Set to `false` to disable the Logs and Metrics app plugin {kib}. Defaults to `true`.

| `xpack.infra.sources.default.metricAlias`
| Index pattern for matching indices that contain Metricbeat data. Defaults to `metricbeat-*`. To match multiple wildcard patterns, use a comma to separate the names, with no space after the comma. For example, `logstash-app1-*,default-logs-*`.
`xpack.infra.sources.default.logAlias`::
Index pattern for matching indices that contain log data. Defaults to `filebeat-*,kibana_sample_data_logs*`. To match multiple wildcard patterns, use a comma to separate the names, with no space after the comma. For example, `logstash-app1-*,default-logs-*`.

| `xpack.infra.sources.default.fields.timestamp`
| Timestamp used to sort log entries. Defaults to `@timestamp`.
`xpack.infra.sources.default.metricAlias`::
Index pattern for matching indices that contain Metricbeat data. Defaults to `metricbeat-*`. To match multiple wildcard patterns, use a comma to separate the names, with no space after the comma. For example, `logstash-app1-*,default-logs-*`.

| `xpack.infra.sources.default.fields.message`
| Fields used to display messages in the Logs app. Defaults to `['message', '@message']`.
`xpack.infra.sources.default.fields.timestamp`::
Timestamp used to sort log entries. Defaults to `@timestamp`.

| `xpack.infra.sources.default.fields.tiebreaker`
| Field used to break ties between two entries with the same timestamp. Defaults to `_doc`.
`xpack.infra.sources.default.fields.message`::
Fields used to display messages in the Logs app. Defaults to `['message', '@message']`.

| `xpack.infra.sources.default.fields.host`
| Field used to identify hosts. Defaults to `host.name`.
`xpack.infra.sources.default.fields.tiebreaker`::
Field used to break ties between two entries with the same timestamp. Defaults to `_doc`.

| `xpack.infra.sources.default.fields.container`
| Field used to identify Docker containers. Defaults to `container.id`.
`xpack.infra.sources.default.fields.host`::
Field used to identify hosts. Defaults to `host.name`.

| `xpack.infra.sources.default.fields.pod`
| Field used to identify Kubernetes pods. Defaults to `kubernetes.pod.uid`.
`xpack.infra.sources.default.fields.container`::
Field used to identify Docker containers. Defaults to `container.id`.

|===
`xpack.infra.sources.default.fields.pod`::
Field used to identify Kubernetes pods. Defaults to `kubernetes.pod.uid`.
20 changes: 8 additions & 12 deletions docs/settings/ml-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ enabled by default.
[[general-ml-settings-kb]]
==== General {ml} settings

[cols="2*<"]
|===
| `xpack.ml.enabled` {ess-icon}
| deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
Set to `true` (default) to enable {kib} {ml-features}. +
+
If set to `false` in `kibana.yml`, the {ml} icon is hidden in this {kib}
instance. If `xpack.ml.enabled` is set to `true` in `elasticsearch.yml`, however,
you can still use the {ml} APIs. To disable {ml} entirely, see the
{ref}/ml-settings.html[{es} {ml} settings].

|===
`xpack.ml.enabled` {ess-icon}::
deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
Set to `true` (default) to enable {kib} {ml-features}. +
+
If set to `false` in `kibana.yml`, the {ml} icon is hidden in this {kib}
instance. If `xpack.ml.enabled` is set to `true` in `elasticsearch.yml`, however,
you can still use the {ml} APIs. To disable {ml} entirely, refer to
{ref}/ml-settings.html[{es} {ml} settings].

[[advanced-ml-settings-kb]]
==== Advanced {ml} settings
Expand Down
39 changes: 14 additions & 25 deletions docs/settings/search-sessions-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,26 @@

Configure the search session settings in your `kibana.yml` configuration file.

`xpack.data_enhanced.search.sessions.enabled` {ess-icon}::
Set to `true` (default) to enable search sessions.

[cols="2*<"]
|===
a| `xpack.data_enhanced.`
`search.sessions.enabled` {ess-icon}
| Set to `true` (default) to enable search sessions.
`xpack.data_enhanced.search.sessions.trackingInterval` {ess-icon}::
The frequency for updating the state of a search session. The default is `10s`.

a| `xpack.data_enhanced.`
`search.sessions.trackingInterval` {ess-icon}
| The frequency for updating the state of a search session. The default is `10s`.

a| `xpack.data_enhanced.`
`search.sessions.pageSize` {ess-icon}
| How many search sessions {kib} processes at once while monitoring
`xpack.data_enhanced.search.sessions.pageSize` {ess-icon}::
How many search sessions {kib} processes at once while monitoring
session progress. The default is `100`.

a| `xpack.data_enhanced.`
`search.sessions.notTouchedTimeout` {ess-icon}
| How long {kib} stores search results from unsaved sessions,
`xpack.data_enhanced.search.sessions.notTouchedTimeout` {ess-icon}::
How long {kib} stores search results from unsaved sessions,
after the last search in the session completes. The default is `5m`.

a| `xpack.data_enhanced.`
`search.sessions.notTouchedInProgressTimeout` {ess-icon}
| How long a search session can run after a user navigates away without saving a session. The default is `1m`.
`xpack.data_enhanced.search.sessions.notTouchedInProgressTimeout` {ess-icon}::
How long a search session can run after a user navigates away without saving a session. The default is `1m`.

a| `xpack.data_enhanced.`
`search.sessions.maxUpdateRetries` {ess-icon}
| How many retries {kib} can perform while attempting to save a search session. The default is `3`.
`xpack.data_enhanced.search.sessions.maxUpdateRetries` {ess-icon}::
How many retries {kib} can perform while attempting to save a search session. The default is `3`.

a| `xpack.data_enhanced.`
`search.sessions.defaultExpiration` {ess-icon}
| How long search session results are stored before they are deleted.
`xpack.data_enhanced.search.sessions.defaultExpiration` {ess-icon}::
How long search session results are stored before they are deleted.
Extending a search session resets the expiration by the same value. The default is `7d`.
|===
22 changes: 9 additions & 13 deletions docs/settings/spaces-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@ roles when Security is enabled.
[[spaces-settings]]
==== Spaces settings

[cols="2*<"]
|===
| `xpack.spaces.enabled`
| deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
Set to `true` (default) to enable Spaces in {kib}.
This setting is deprecated. Starting in 8.0, it will not be possible to disable this plugin.
`xpack.spaces.enabled`::
deprecated:[7.16.0,"In 8.0 and later, this setting will no longer be supported."]
Set to `true` (default) to enable Spaces in {kib}.
This setting is deprecated. Starting in 8.0, it will not be possible to disable this plugin.

| `xpack.spaces.maxSpaces`
| The maximum amount of Spaces that can be used with this instance of {kib}. Some operations
in {kib} return all spaces using a single `_search` from {es}, so this must be
set lower than the `index.max_result_window` in {es}.
Defaults to `1000`.

|===
`xpack.spaces.maxSpaces`::
The maximum amount of Spaces that can be used with this instance of {kib}. Some operations
in {kib} return all spaces using a single `_search` from {es}, so this must be
set lower than the `index.max_result_window` in {es}.
Defaults to `1000`.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ describe('metric_expression', () => {
reportDescription="Fancy chart description"
reportTitle="My fanci metric chart"
>
<AutoScale>
<AutoScale
key="3"
>
<div
data-test-subj="lns_metric_value"
style={
Expand Down Expand Up @@ -135,7 +137,9 @@ describe('metric_expression', () => {
reportDescription="Fancy chart description"
reportTitle="My fanci metric chart"
>
<AutoScale>
<AutoScale
key="last"
>
<div
data-test-subj="lns_metric_value"
style={
Expand Down Expand Up @@ -179,7 +183,9 @@ describe('metric_expression', () => {
reportDescription=""
reportTitle=""
>
<AutoScale>
<AutoScale
key="3"
>
<div
data-test-subj="lns_metric_value"
style={
Expand Down Expand Up @@ -223,7 +229,9 @@ describe('metric_expression', () => {
reportDescription=""
reportTitle=""
>
<AutoScale>
<AutoScale
key="3"
>
<div
data-test-subj="lns_metric_value"
style={
Expand Down Expand Up @@ -309,7 +317,9 @@ describe('metric_expression', () => {
reportDescription=""
reportTitle=""
>
<AutoScale>
<AutoScale
key="0"
>
<div
data-test-subj="lns_metric_value"
style={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function MetricChart({
reportDescription={description}
className="lnsMetricExpression__container"
>
<AutoScale>
<AutoScale key={value}>
<div data-test-subj="lns_metric_value" style={{ fontSize: '60pt', fontWeight: 600 }}>
{value}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { OperationType } from '../../../../../../../lens/public';
import { ReportViewType } from '../../types';
import {
CLS_FIELD,
Expand All @@ -13,6 +13,7 @@ import {
LCP_FIELD,
TBT_FIELD,
TRANSACTION_TIME_TO_FIRST_BYTE,
TRANSACTION_DURATION,
} from './elasticsearch_fieldnames';
import {
AGENT_HOST_LABEL,
Expand Down Expand Up @@ -45,6 +46,8 @@ import {
TBT_LABEL,
URL_LABEL,
BACKEND_TIME_LABEL,
MONITORS_DURATION_LABEL,
PAGE_LOAD_TIME_LABEL,
LABELS_FIELD,
} from './labels';

Expand All @@ -69,9 +72,11 @@ export const FieldLabels: Record<string, string> = {
[FID_FIELD]: FID_LABEL,
[CLS_FIELD]: CLS_LABEL,
[TRANSACTION_TIME_TO_FIRST_BYTE]: BACKEND_TIME_LABEL,
[TRANSACTION_DURATION]: PAGE_LOAD_TIME_LABEL,

'monitor.id': MONITOR_ID_LABEL,
'monitor.status': MONITOR_STATUS_LABEL,
'monitor.duration.us': MONITORS_DURATION_LABEL,

'agent.hostname': AGENT_HOST_LABEL,
'host.hostname': HOST_NAME_LABEL,
Expand All @@ -86,6 +91,7 @@ export const FieldLabels: Record<string, string> = {
'performance.metric': METRIC_LABEL,
'Business.KPI': KPI_LABEL,
'http.request.method': REQUEST_METHOD,
percentile: 'Percentile',
LABEL_FIELDS_FILTER: LABELS_FIELD,
LABEL_FIELDS_BREAKDOWN: 'Labels field',
};
Expand Down Expand Up @@ -114,8 +120,16 @@ export const USE_BREAK_DOWN_COLUMN = 'USE_BREAK_DOWN_COLUMN';
export const FILTER_RECORDS = 'FILTER_RECORDS';
export const TERMS_COLUMN = 'TERMS_COLUMN';
export const OPERATION_COLUMN = 'operation';
export const PERCENTILE = 'percentile';

export const REPORT_METRIC_FIELD = 'REPORT_METRIC_FIELD';

export const PERCENTILE_RANKS = [
'99th' as OperationType,
'95th' as OperationType,
'90th' as OperationType,
'75th' as OperationType,
'50th' as OperationType,
];
export const LABEL_FIELDS_FILTER = 'LABEL_FIELDS_FILTER';
export const LABEL_FIELDS_BREAKDOWN = 'LABEL_FIELDS_BREAKDOWN';
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from './constants/elasticsearch_fieldnames';
import { buildExistsFilter, buildPhrasesFilter } from './utils';
import { sampleAttributeKpi } from './test_data/sample_attribute_kpi';
import { RECORDS_FIELD, REPORT_METRIC_FIELD, ReportTypes } from './constants';
import { RECORDS_FIELD, REPORT_METRIC_FIELD, PERCENTILE_RANKS, ReportTypes } from './constants';

describe('Lens Attribute', () => {
mockAppIndexPattern();
Expand Down Expand Up @@ -75,6 +75,63 @@ describe('Lens Attribute', () => {
expect(lnsAttrKpi.getJSON()).toEqual(sampleAttributeKpi);
});

it('should return expected json for percentile breakdowns', function () {
const seriesConfigKpi = getDefaultConfigs({
reportType: ReportTypes.KPI,
dataType: 'ux',
indexPattern: mockIndexPattern,
});

const lnsAttrKpi = new LensAttributes([
{
filters: [],
seriesConfig: seriesConfigKpi,
time: {
from: 'now-1h',
to: 'now',
},
indexPattern: mockIndexPattern,
name: 'ux-series-1',
breakdown: 'percentile',
reportDefinitions: {},
selectedMetricField: 'transaction.duration.us',
color: '#54b399',
},
]);

expect(lnsAttrKpi.getJSON().state.datasourceStates.indexpattern.layers.layer0.columns).toEqual({
'x-axis-column-layer0': {
dataType: 'date',
isBucketed: true,
label: '@timestamp',
operationType: 'date_histogram',
params: {
interval: 'auto',
},
scale: 'interval',
sourceField: '@timestamp',
},
...PERCENTILE_RANKS.reduce((acc: Record<string, any>, rank, index) => {
acc[`y-axis-column-${index === 0 ? 'layer' + index : index}`] = {
dataType: 'number',
filter: {
language: 'kuery',
query: 'transaction.type: page-load and processor.event: transaction',
},
isBucketed: false,
label: `${rank} percentile of page load time`,
operationType: 'percentile',
params: {
percentile: Number(rank.slice(0, 2)),
},
scale: 'ratio',
sourceField: 'transaction.duration.us',
};
return acc;
}, {}),
});
});

it('should return main y axis', function () {
expect(lnsAttr.getMainYAxis(layerConfig, 'layer0', '')).toEqual({
dataType: 'number',
Expand Down Expand Up @@ -413,7 +470,7 @@ describe('Lens Attribute', () => {
yConfig: [{ color: 'green', forAccessor: 'y-axis-column-layer0' }],
},
],
legend: { isVisible: true, position: 'right' },
legend: { isVisible: true, showSingleSeries: true, position: 'right' },
preferredSeriesType: 'line',
tickLabelsVisibilitySettings: { x: true, yLeft: true, yRight: true },
valueLabels: 'hide',
Expand Down
Loading

0 comments on commit cff64f1

Please sign in to comment.