Skip to content

Commit

Permalink
Merge branch 'main' into eui/50.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsongl committed Mar 16, 2022
2 parents 4fdd7e6 + 5641dcc commit b6201dc
Show file tree
Hide file tree
Showing 486 changed files with 17,577 additions and 100,990 deletions.
18 changes: 17 additions & 1 deletion .buildkite/scripts/steps/es_snapshots/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ echo "--- Build Elasticsearch"
:distribution:archives:darwin-aarch64-tar:assemble \
:distribution:archives:darwin-tar:assemble \
:distribution:docker:docker-export:assemble \
:distribution:docker:cloud-docker-export:assemble \
:distribution:archives:linux-aarch64-tar:assemble \
:distribution:archives:linux-tar:assemble \
:distribution:archives:windows-zip:assemble \
Expand All @@ -79,11 +80,26 @@ find distribution -type f \( -name 'elasticsearch-*-*-*-*.tar.gz' -o -name 'elas

ls -alh "$destination"

echo "--- Create docker image archives"
echo "--- Create docker default image archives"
docker images "docker.elastic.co/elasticsearch/elasticsearch"
docker images "docker.elastic.co/elasticsearch/elasticsearch" --format "{{.Tag}}" | xargs -n1 echo 'docker save docker.elastic.co/elasticsearch/elasticsearch:${0} | gzip > ../es-build/elasticsearch-${0}-docker-image.tar.gz'
docker images "docker.elastic.co/elasticsearch/elasticsearch" --format "{{.Tag}}" | xargs -n1 bash -c 'docker save docker.elastic.co/elasticsearch/elasticsearch:${0} | gzip > ../es-build/elasticsearch-${0}-docker-image.tar.gz'

echo "--- Create kibana-ci docker cloud image archives"
ES_CLOUD_ID=$(docker images "docker.elastic.co/elasticsearch-ci/elasticsearch-cloud" --format "{{.ID}}")
ES_CLOUD_VERSION=$(docker images "docker.elastic.co/elasticsearch-ci/elasticsearch-cloud" --format "{{.Tag}}")
KIBANA_ES_CLOUD_VERSION="$ES_CLOUD_VERSION-$ELASTICSEARCH_GIT_COMMIT"
KIBANA_ES_CLOUD_IMAGE="docker.elastic.co/kibana-ci/elasticsearch-cloud:$KIBANA_ES_CLOUD_VERSION"

docker tag "$ES_CLOUD_ID" "$KIBANA_ES_CLOUD_IMAGE"

echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
trap 'docker logout docker.elastic.co' EXIT
docker image push "$KIBANA_ES_CLOUD_IMAGE"

export ELASTICSEARCH_CLOUD_IMAGE="$KIBANA_ES_CLOUD_IMAGE"
export ELASTICSEARCH_CLOUD_IMAGE_CHECKSUM="$(docker images "$KIBANA_ES_CLOUD_IMAGE" --format "{{.Digest}}")"

echo "--- Create checksums for snapshot files"
cd "$destination"
find ./* -exec bash -c "shasum -a 512 {} > {}.sha512" \;
Expand Down
13 changes: 13 additions & 0 deletions .buildkite/scripts/steps/es_snapshots/create_manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const { BASE_BUCKET_DAILY } = require('./bucket_config.js');
const destination = process.argv[2] || __dirname + '/test';

const ES_BRANCH = process.env.ELASTICSEARCH_BRANCH;
const ES_CLOUD_IMAGE = process.env.ELASTICSEARCH_CLOUD_IMAGE;
const ES_CLOUD_IMAGE_CHECKSUM = process.env.ELASTICSEARCH_CLOUD_IMAGE_CHECKSUM;
const GIT_COMMIT = process.env.ELASTICSEARCH_GIT_COMMIT;
const GIT_COMMIT_SHORT = process.env.ELASTICSEARCH_GIT_COMMIT_SHORT;

Expand Down Expand Up @@ -59,6 +61,17 @@ const { BASE_BUCKET_DAILY } = require('./bucket_config.js');
};
});

if (ES_CLOUD_IMAGE && ES_CLOUD_IMAGE_CHECKSUM) {
manifestEntries.push({
checksum: ES_CLOUD_IMAGE_CHECKSUM,
url: ES_CLOUD_IMAGE,
version: VERSION,
platform: 'docker',
architecture: 'image',
license: 'default',
});
}

const manifest = {
id: SNAPSHOT_ID,
bucket: `${BASE_BUCKET_DAILY}/${DESTINATION}`.toString(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> [AppMountParameters.onAppLeave](./kibana-plugin-core-public.appmountparameters.onappleave.md) has been deprecated in favor of [ScopedHistory.block](./kibana-plugin-core-public.scopedhistory.block.md)
> [AppMountParameters.onAppLeave](./kibana-plugin-core-public.appmountparameters.onappleave.md) has been deprecated in favor of [ScopedHistory.block](./kibana-plugin-core-public.scopedhistory.block.md) 8.8.0
>
A handler that will be executed before leaving the application, either when going to another application or when closing the browser tab or manually changing the url. Should return `confirm` to prompt a message to the user before leaving the page, or `default` to keep the default behavior (doing nothing).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> Use [AppMountParameters.history](./kibana-plugin-core-public.appmountparameters.history.md) instead.
> Use [AppMountParameters.history](./kibana-plugin-core-public.appmountparameters.history.md) instead. 8.8.0
>
The route path for configuring navigation to the application. This string should not include the base path from HTTP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> [ScopedHistory.block](./kibana-plugin-core-public.scopedhistory.block.md) should be used instead.
> [ScopedHistory.block](./kibana-plugin-core-public.scopedhistory.block.md) should be used instead. 8.8.0
>
A function that can be used to register a handler that will be called when the user is leaving the current application, allowing to prompt a confirmation message before actually changing the page.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

> Warning: This API is now obsolete.
>
> 8.8.0
>
exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

> Warning: This API is now obsolete.
>
> 8.8.0
>
exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

> Warning: This API is now obsolete.
>
> Provided for legacy compatibility. Prefer the `request` property instead.
> Provided for legacy compatibility. Prefer the `request` property instead. 8.8.0
>
> Note to maintainers: when looking at usages, mind that typical use could be inside a `catch` block, so TS and code-reference navigation might not highlight them.
>
<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

> Warning: This API is now obsolete.
>
> Provided for legacy compatibility. Prefer the `response` property instead.
> Provided for legacy compatibility. Prefer the `response` property instead. 8.8.0
>
> Note to maintainers: when looking at usages, mind that typical use could be inside a `catch` block, so TS and code-reference navigation might not highlight them.
>
<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> If `createNewCopy` is specified, the new object has a new (undefined) origin ID. This is only needed for the case where `createNewCopies` mode is disabled and ambiguous source conflicts are detected. When `createNewCopies` mode is permanently enabled, this field will be redundant and can be removed.
> Can be removed when https://github.com/elastic/kibana/issues/91615 is done. If `createNewCopy` is specified, the new object has a new (undefined) origin ID. This is only needed for the case where `createNewCopies` mode is disabled and ambiguous source conflicts are detected. When `createNewCopies` mode is permanently enabled, this field will be redundant and can be removed.
>
<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> Asynchronous lifecycles are deprecated, and should be migrated to sync
> Asynchronous lifecycles are deprecated, and should be migrated to sync 8.8.0
>
A plugin with asynchronous lifecycle methods.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> use the processes field instead.
> use the processes field instead. 8.8.0
>
Process related metrics.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

> Warning: This API is now obsolete.
>
> To be deleted when https://github.com/elastic/kibana/issues/101948 is done.
>
Specifies directory names that can be imported by other ui-plugins built using the same instance of the @<!-- -->kbn/optimizer. A temporary measure we plan to replace with better mechanisms for sharing static code between plugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> If `createNewCopy` is specified, the new object has a new (undefined) origin ID. This is only needed for the case where `createNewCopies` mode is disabled and ambiguous source conflicts are detected. When `createNewCopies` mode is permanently enabled, this field will be redundant and can be removed.
> Can be removed when https://github.com/elastic/kibana/issues/91615 is done. If `createNewCopy` is specified, the new object has a new (undefined) origin ID. This is only needed for the case where `createNewCopies` mode is disabled and ambiguous source conflicts are detected. When `createNewCopies` mode is permanently enabled, this field will be redundant and can be removed.
>
<b>Signature:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> Warning: This API is now obsolete.
>
> Use `warn` instead.
> Use `warn` instead. 8.8.0
>
<b>Signature:</b>
Expand Down
119 changes: 119 additions & 0 deletions docs/management/connectors/action-types/xmatters.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
[[xmatters-action-type]]
=== xMatters connector and action
++++
<titleabbrev>xMatters</titleabbrev>
++++

The xMatters connector uses the https://help.xmatters.com/integrations/#cshid=Elastic[xMatters Workflow for Elastic] to send actionable alerts to on-call xMatters resources.

[float]
[[xmatters-connector-configuration]]
==== Connector configuration

xMatters connectors have the following configuration properties:

Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
Authentication Type:: The type of authentication used in the request made to xMatters.
URL:: The request URL for the Elastic Alerts trigger in xMatters. If you are using the <<action-settings, `xpack.actions.allowedHosts`>> setting, make sure the hostname is added to the allowed hosts.
Username:: Username for HTTP Basic Authentication.
Password:: Password for HTTP Basic Authentication.

[float]
[[xmatters-connector-networking-configuration]]
==== Connector networking configuration

Use the <<action-settings, Action configuration settings>> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations.

[float]
[[Preconfigured-xmatters-configuration]]
==== Preconfigured connector type

Connector using Basic Authentication
[source,text]
--
my-xmatters:
name: preconfigured-xmatters-connector-type
actionTypeId: .xmatters
config:
configUrl: https://test.host
usesBasic: true
secrets:
user: testuser
password: passwordkeystorevalue
--

Connector using URL Authentication
[source,text]
--
my-xmatters:
name: preconfigured-xmatters-connector-type
actionTypeId: .xmatters
config:
usesBasic: false
secrets:
secretsUrl: https://test.host?apiKey=1234-abcd
--

Config defines information for the connector type:

`configUrl`:: A URL string that corresponds to *URL*. Only used if `usesBasic` is true.

`usesBasic`:: A boolean that corresponds to *Authentication Type*. If `true`, this connector will require values for `user` and `password` inside the secrets configuration. Defaults to `true`.

Secrets defines sensitive information for the connector type:

`user`:: A string that corresponds to *User*. Required if `usesBasic` is set to `true`.

`password`:: A string that corresponds to *Password*. Should be stored in the <<creating-keystore, {kib} keystore>>. Required if `usesBasic` is set to `true`.

`secretsUrl`:: A URL string that corresponds to *URL*. Only used if `usesBasic` is false, indicating the API key is included in the URL.

[float]
[[define-xmatters-ui]]
==== Define connector in Stack Management

Define xMatters connector properties. Choose between basic and URL authentication for the requests:

[role="screenshot"]
image::management/connectors/images/xmatters-connector-basic.png[xMatters connector with basic authentication]

[role="screenshot"]
image::management/connectors/images/xmatters-connector-url.png[xMatters connector with url authentication]

Test xMatters rule parameters:

[role="screenshot"]
image::management/connectors/images/xmatters-params-test.png[xMatters params test]

[float]
[[xmatters-action-configuration]]
==== Action configuration

xMatters rules have the following properties:

Severity:: Severity of the rule.
Tags:: Comma-separated list of tags for the rule as provided by the user in Elastic.

[float]
[[xmatters-benefits]]
==== Configure xMatters

By integrating with xMatters, you can:

. Leverage schedules, rotations, escalations, and device preferences to quickly engage the right resources.
. Allow resolvers to take immediate action with customizable notification responses, including incident creation.
. Reduce manual tasks so teams can streamline their resources and focus.

[float]
[[xmatters-connector-prerequisites]]
==== Prerequisites
To use the Elastic xMatters connector either install the Elastic workflow template, or add the Elastic Alerts trigger to one of your existing xMatters flows. Once the workflow or trigger is in your xMatters instance, configure Elastic to send alerts to xMatters.

. In xMatters, double-click the Elastic trigger to open the settings menu.
. Choose the authentication method and set your authenticating user.
. Copy the initiation URL.
. In Elastic, open the xMatters connector.
. Set the authentication method, then paste the initiation URL.

Note: If you use basic authentication, specify the Web / App Login ID in the user credentials for the connector. This value can be found in the Edit Profile modal in xMatters for each user.
For detailed configuration instructions, see https://help.xmatters.com/ondemand/#cshid=ElasticTrigger[xMatters online help]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/management/connectors/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ include::action-types/servicenow-itom.asciidoc[]
include::action-types/swimlane.asciidoc[]
include::action-types/slack.asciidoc[]
include::action-types/webhook.asciidoc[]
include::action-types/xmatters.asciidoc[]
include::pre-configured-connectors.asciidoc[]
2 changes: 1 addition & 1 deletion docs/settings/alert-action-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ into a single string. This configuration can be used for environments where
the files cannot be made available.

`xpack.actions.enabledActionTypes` {ess-icon}::
A list of action types that are enabled. It defaults to `[*]`, enabling all types. The names for built-in {kib} action types are prefixed with a `.` and include: `.email`, `.index`, `.jira`, `.pagerduty`, `.resilient`, `.server-log`, `.servicenow`, .`servicenow-itom`, `.servicenow-sir`, `.slack`, `.swimlane`, `.teams`, and `.webhook`. An empty list `[]` will disable all action types.
A list of action types that are enabled. It defaults to `[*]`, enabling all types. The names for built-in {kib} action types are prefixed with a `.` and include: `.email`, `.index`, `.jira`, `.pagerduty`, `.resilient`, `.server-log`, `.servicenow`, .`servicenow-itom`, `.servicenow-sir`, `.slack`, `.swimlane`, `.teams`, `.xmatters`, and `.webhook`. An empty list `[]` will disable all action types.
+
Disabled action types will not appear as an option when creating new connectors, but existing connectors and actions of that type will remain in {kib} and will not function.

Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
configuration: `${ENTERPRISE_SEARCH_DOCS}configuration.html`,
licenseManagement: `${ENTERPRISE_SEARCH_DOCS}license-management.html`,
mailService: `${ENTERPRISE_SEARCH_DOCS}mailer-configuration.html`,
troubleshootSetup: `${ENTERPRISE_SEARCH_DOCS}troubleshoot-setup.html`,
usersAccess: `${ENTERPRISE_SEARCH_DOCS}users-access.html`,
},
workplaceSearch: {
Expand All @@ -120,6 +121,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
customSourcePermissions: `${WORKPLACE_SEARCH_DOCS}workplace-search-custom-api-sources.html#custom-api-source-document-level-access-control`,
documentPermissions: `${WORKPLACE_SEARCH_DOCS}workplace-search-sources-document-permissions.html`,
dropbox: `${WORKPLACE_SEARCH_DOCS}workplace-search-dropbox-connector.html`,
externalSharePointOnline: `${WORKPLACE_SEARCH_DOCS}sharepoint-online-external.html`,
externalIdentities: `${WORKPLACE_SEARCH_DOCS}workplace-search-external-identities-api.html`,
gettingStarted: `${WORKPLACE_SEARCH_DOCS}workplace-search-getting-started.html`,
gitHub: `${WORKPLACE_SEARCH_DOCS}workplace-search-github-connector.html`,
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export interface DocLinks {
readonly configuration: string;
readonly licenseManagement: string;
readonly mailService: string;
readonly troubleshootSetup: string;
readonly usersAccess: string;
};
readonly workplaceSearch: {
Expand All @@ -110,6 +111,7 @@ export interface DocLinks {
readonly customSourcePermissions: string;
readonly documentPermissions: string;
readonly dropbox: string;
readonly externalSharePointOnline: string;
readonly externalIdentities: string;
readonly gitHub: string;
readonly gettingStarted: string;
Expand Down
11 changes: 0 additions & 11 deletions packages/kbn-optimizer/src/common/array_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,3 @@ export const descending = <T>(...getters: Array<SortPropGetter<T>>): Comparator<
* Alternate Array#includes() implementation with sane types, functions as a type guard
*/
export const includes = <T>(array: T[], value: any): value is T => array.includes(value);

/**
* Ponyfill for Object.fromEntries()
*/
export const entriesToObject = <T>(entries: Array<readonly [string, T]>): Record<string, T> => {
const object: Record<string, T> = {};
for (const [key, value] of entries) {
object[key] = value;
}
return object;
};
Loading

0 comments on commit b6201dc

Please sign in to comment.