Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into task/olm-90513-7_…
Browse files Browse the repository at this point in the history
…13-policy-migration
  • Loading branch information
paul-tavares committed Mar 22, 2021
2 parents 2498b3e + 04e4661 commit 382ebf9
Show file tree
Hide file tree
Showing 466 changed files with 1,947 additions and 18,121 deletions.
14 changes: 7 additions & 7 deletions api_docs/core_saved_objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -4581,15 +4581,15 @@
"description": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 34
"lineNumber": 36
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 34
"lineNumber": 36
}
},
{
Expand Down Expand Up @@ -4628,7 +4628,7 @@
"description": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 43
"lineNumber": 45
}
},
{
Expand All @@ -4641,15 +4641,15 @@
"description": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 43
"lineNumber": 45
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 43
"lineNumber": 45
}
},
{
Expand Down Expand Up @@ -4681,15 +4681,15 @@
"description": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 58
"lineNumber": 60
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 58
"lineNumber": 60
}
}
],
Expand Down
3 changes: 3 additions & 0 deletions docs/api/saved-objects/export.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ experimental[] Retrieve sets of saved objects that you want to import into {kib}

TIP: You must include `type` or `objects` in the request body.

NOTE: The <<savedObjects-maxImportExportSize, `savedObjects.maxImportExportSize`>> configuration setting
limits the number of saved objects which may be exported.

[[saved-objects-api-export-request-response-body]]
==== Response body

Expand Down
5 changes: 5 additions & 0 deletions docs/api/saved-objects/import.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ The request body must include the multipart/form-data type.

`file`::
A file exported using the export API.
+
NOTE: The <<savedObjects-maxImportExportSize, `savedObjects.maxImportExportSize`>> configuration setting
limits the number of saved objects which may be included in this file. Similarly, the
<<savedObjects-maxImportPayloadBytes, `savedObjects.maxImportPayloadBytes`>> setting limits the overall
size of the file that can be imported.

[[saved-objects-api-import-response-body]]
==== Response body
Expand Down
10 changes: 10 additions & 0 deletions docs/management/managing-saved-objects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ navigate to the NDJSON file that
represents the objects to import. By default,
saved objects already in {kib} are overwritten.

NOTE: The <<savedObjects-maxImportExportSize, `savedObjects.maxImportExportSize`>> configuration setting
limits the number of saved objects which may be included in this file. Similarly, the
<<savedObjects-maxImportPayloadBytes, `savedObjects.maxImportPayloadBytes`>> setting limits the overall
size of the file that can be imported.


[float]
==== Export

Expand All @@ -78,6 +84,10 @@ You have two options for exporting saved objects.
This action creates an NDJSON with all your saved objects. By default, the NDJSON includes child objects that are related to the saved
objects. Exported dashboards include their associated index patterns.

NOTE: The <<savedObjects-maxImportExportSize, `savedObjects.maxImportExportSize`>> configuration setting
limits the number of saved objects which may be exported.


[float]
[role="xpack"]
[[managing-saved-objects-copy-to-space]]
Expand Down
6 changes: 6 additions & 0 deletions docs/redirects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,9 @@ This content has moved. Refer to <<dashboard, **Dashboard**>>.
== Ingest Node Pipelines

This content has moved. See {ref}/ingest.html[Ingest pipelines].


[role="exclude",id="create-panels-with-timelion"]
== Timelion

This content has moved. refer to <<timelion>>.
35 changes: 35 additions & 0 deletions docs/settings/banners-settings.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[role="xpack"]
[[banners-settings-kb]]
=== Banner settings in {kib}
++++
<titleabbrev>Banners settings</titleabbrev>
++++

Banners are disabled by default. You need to manually configure them in order to use the feature.

You can configure the `xpack.banners` settings in your `kibana.yml` file.

[[general-banners-settings-kb]]
==== General banner settings

[cols="2*<"]
|===

| `xpack.banners.placement`
| Set to `header` to enable the header banner. Defaults to `disabled`.

| `xpack.banners.textContent`
| The text to display inside the banner, either plain text or Markdown.

| `xpack.banners.textColor`
| The color for the banner text. Defaults to `#8A6A0A`.

| `xpack.banners.backgroundColor`
| The color of the banner background. Defaults to `#FFF9E8`.

|===

[NOTE]
====
The `banners` plugin is a https://www.elastic.co/subscriptions[subscription feature]
====
1 change: 1 addition & 0 deletions docs/settings/settings-xkb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ For more {kib} configuration settings, see <<settings>>.

include::alert-action-settings.asciidoc[]
include::apm-settings.asciidoc[]
include::banners-settings.asciidoc[]
include::dev-settings.asciidoc[]
include::graph-settings.asciidoc[]
include::infrastructure-ui-settings.asciidoc[]
Expand Down
19 changes: 17 additions & 2 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -455,13 +455,27 @@ manner that is inconsistent with `/proc/self/cgroup`.
| Override for cgroup cpuacct path when mounted
in a manner that is inconsistent with `/proc/self/cgroup`.

|[[savedObjects-maxImportExportSize]] `savedObjects.maxImportExportSize:`
| The maximum count of saved objects that can be imported or exported.
This setting exists to prevent the {kib} server from runnning out of memory when handling
large numbers of saved objects. It is recommended to only raise this setting if you are
confident your server can hold this many objects in memory.
*Default: `10000`*

|[[savedObjects-maxImportPayloadBytes]] `savedObjects.maxImportPayloadBytes:`
| The maximum byte size of a saved objects import that the {kib} server will accept.
This setting exists to prevent the {kib} server from runnning out of memory when handling
a large import payload. Note that this setting overrides the more general
<<server-maxPayloadBytes, `server.maxPayloadBytes`>> for saved object imports only.
*Default: `26214400`*

|[[server-basePath]] `server.basePath:`
| Enables you to specify a path to mount {kib} at if you are
running behind a proxy. Use the <<server-rewriteBasePath, `server.rewriteBasePath`>> setting to tell {kib}
if it should remove the basePath from requests it receives, and to prevent a
deprecation warning at startup. This setting cannot end in a slash (`/`).

|[[server-publicBaseUrl]] `server.publicBaseUrl:`
|[[server-publicBaseUrl]] `server.publicBaseUrl:` {ess-icon}
| The publicly available URL that end-users access Kibana at. Must include the protocol, hostname, port
(if different than the defaults for `http` and `https`, 80 and 443 respectively), and the
<<server-basePath, `server.basePath`>> (if configured). This setting cannot end in a slash (`/`).
Expand Down Expand Up @@ -495,7 +509,7 @@ back end server. To allow remote users to connect, set the value to the IP addre
| The number of milliseconds to wait for additional data before restarting
the <<server-socketTimeout, `server.socketTimeout`>> counter. *Default: `"120000"`*

| `server.maxPayloadBytes:`
|[[server-maxPayloadBytes]] `server.maxPayloadBytes:`
| The maximum payload size in bytes
for incoming server requests. *Default: `1048576`*

Expand Down Expand Up @@ -671,6 +685,7 @@ Valid locales are: `en`, `zh-CN`, `ja-JP`. *Default: `en`*

include::{kib-repo-dir}/settings/alert-action-settings.asciidoc[]
include::{kib-repo-dir}/settings/apm-settings.asciidoc[]
include::{kib-repo-dir}/settings/banners-settings.asciidoc[]
include::{kib-repo-dir}/settings/dev-settings.asciidoc[]
include::{kib-repo-dir}/settings/graph-settings.asciidoc[]
include::{kib-repo-dir}/settings/fleet-settings.asciidoc[]
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,3 @@ pageLoadAssetSize:
fileUpload: 25664
banners: 17946
mapsEms: 26072
cases: 102558
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const createStartContractMock = () => {
},
savedObjects: {
customIndex: false,
maxImportExportSizeBytes: 10000,
maxImportExportSize: 10000,
maxImportPayloadBytes: 26214400,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ describe('CoreUsageDataService', () => {
},
"savedObjects": Object {
"customIndex": false,
"maxImportExportSizeBytes": 10000,
"maxImportExportSize": 10000,
"maxImportPayloadBytes": 26214400,
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/core_usage_data/core_usage_data_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export class CoreUsageDataService implements CoreService<CoreUsageDataSetup, Cor
savedObjects: {
customIndex: isCustomIndex(this.kibanaConfig!.index),
maxImportPayloadBytes: this.soConfig.maxImportPayloadBytes.getValueInBytes(),
maxImportExportSizeBytes: this.soConfig.maxImportExportSize.getValueInBytes(),
maxImportExportSize: this.soConfig.maxImportExportSize,
},
},
environment: {
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/core_usage_data/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export interface CoreConfigUsageData {
savedObjects: {
customIndex: boolean;
maxImportPayloadBytes: number;
maxImportExportSizeBytes: number;
maxImportExportSize: number;
};

// uiSettings: {
Expand Down
4 changes: 3 additions & 1 deletion src/core/server/saved_objects/export/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export class SavedObjectsExportError extends Error {
static exportSizeExceeded(limit: number) {
return new SavedObjectsExportError(
'export-size-exceeded',
`Can't export more than ${limit} objects`
`Can't export more than ${limit} objects. ` +
'If your server has enough memory, this limit can be increased ' +
'by adjusting the "savedObjects.maxImportExportSize" setting.'
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,9 @@ describe('getSortedObjectsForExport()', () => {
request,
types: ['index-pattern', 'search'],
})
).rejects.toThrowErrorMatchingInlineSnapshot(`"Can't export more than 1 objects"`);
).rejects.toThrowErrorMatchingInlineSnapshot(
`"Can't export more than 1 objects. If your server has enough memory, this limit can be increased by adjusting the \\"savedObjects.maxImportExportSize\\" setting."`
);
expect(savedObjectsClient.closePointInTime).toHaveBeenCalledTimes(1);
});

Expand Down Expand Up @@ -1112,7 +1114,7 @@ describe('getSortedObjectsForExport()', () => {
],
};
await expect(exporter.exportByObjects(exportOpts)).rejects.toThrowErrorMatchingInlineSnapshot(
`"Can't export more than 1 objects"`
`"Can't export more than 1 objects. If your server has enough memory, this limit can be increased by adjusting the \\"savedObjects.maxImportExportSize\\" setting."`
);
});

Expand Down
4 changes: 2 additions & 2 deletions src/core/server/saved_objects/saved_objects_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const savedObjectsConfig = {
path: 'savedObjects',
schema: schema.object({
maxImportPayloadBytes: schema.byteSize({ defaultValue: 26214400 }),
maxImportExportSize: schema.byteSize({ defaultValue: 10000 }),
maxImportExportSize: schema.number({ defaultValue: 10000 }),
}),
};

Expand All @@ -43,7 +43,7 @@ export class SavedObjectConfig {
rawMigrationConfig: SavedObjectsMigrationConfigType
) {
this.maxImportPayloadBytes = rawConfig.maxImportPayloadBytes.getValueInBytes();
this.maxImportExportSize = rawConfig.maxImportExportSize.getValueInBytes();
this.maxImportExportSize = rawConfig.maxImportExportSize;
this.migration = rawMigrationConfig;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('SavedObjectsService', () => {
}
return new BehaviorSubject({
maxImportPayloadBytes: new ByteSizeValue(0),
maxImportExportSize: new ByteSizeValue(0),
maxImportExportSize: 10000,
});
});
return mockCoreContext.create({ configService, env });
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ export interface CoreConfigUsageData {
savedObjects: {
customIndex: boolean;
maxImportPayloadBytes: number;
maxImportExportSizeBytes: number;
maxImportExportSize: number;
};
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 382ebf9

Please sign in to comment.