Skip to content

Commit

Permalink
Merge branch 'main' into scottybollinger/api-keys
Browse files Browse the repository at this point in the history
  • Loading branch information
scottybollinger authored Dec 2, 2021
2 parents 20fbc69 + 23652de commit 01476a8
Show file tree
Hide file tree
Showing 502 changed files with 7,154 additions and 5,260 deletions.
5 changes: 5 additions & 0 deletions .buildkite/scripts/build_kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ if [[ "${GITHUB_PR_LABELS:-}" == *"ci:deploy-cloud"* ]]; then
--skip-docker-ubi \
--skip-docker-centos \
--skip-docker-contexts

CLOUD_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" docker.elastic.co/kibana-ci/kibana-cloud)
cat << EOF | buildkite-agent annotate --style "info" --context cloud-image
Cloud image: $CLOUD_IMAGE
EOF
fi

echo "--- Archive Kibana Distribution"
Expand Down
8 changes: 8 additions & 0 deletions dev_docs/contributing/standards.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ Every public API should have a release tag specified at the top of it’s docume

Every team should be collecting telemetry metrics on it’s public API usage. This will be important for knowing when it’s safe to make breaking changes. The Core team will be looking into ways to make this easier and an automatic part of registration (see [#112291](https://github.com/elastic/kibana/issues/112291)).

### APM

Kibana server and client are instrumented with APM node and APM RUM clients respectively, tracking serveral types of transactions by default, such as `page-load`, `request`, etc.
You may introduce custom transactions. Please refer to the [APM documentation](https://www.elastic.co/guide/en/apm/get-started/current/index.html) and follow these guidelines when doing so:

- Use dashed syntax for transaction types and names: `my-transaction-type` and `my-transaction-name`
- [Refrain from adding too many custom labels](https://www.elastic.co/guide/en/apm/get-started/current/metadata.html)

### Documentation

Every public API should be documented inside the [docs/api](https://github.com/elastic/kibana/tree/main/docs/api) folder in asciidoc (this content will eventually be migrated to mdx to support the new docs system). If a public REST API is undocumented, you should either document it, or make it internal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,11 @@ readonly links: {
readonly indexingDocumentsSchema: string;
readonly logSettings: string;
readonly metaEngines: string;
readonly nativeAuth: string;
readonly precisionTuning: string;
readonly relevanceTuning: string;
readonly resultSettings: string;
readonly searchUI: string;
readonly security: string;
readonly standardAuth: string;
readonly synonyms: string;
readonly webCrawler: string;
readonly webCrawlerEventLogs: string;
Expand Down Expand Up @@ -106,15 +104,13 @@ readonly links: {
readonly indexingSchedule: string;
readonly jiraCloud: string;
readonly jiraServer: string;
readonly nativeAuth: string;
readonly oneDrive: string;
readonly permissions: string;
readonly salesforce: string;
readonly security: string;
readonly serviceNow: string;
readonly sharePoint: string;
readonly slack: string;
readonly standardAuth: string;
readonly synch: string;
readonly zendesk: string;
};
Expand Down

Large diffs are not rendered by default.

125 changes: 69 additions & 56 deletions docs/setup/connect-to-elasticsearch.asciidoc
Original file line number Diff line number Diff line change
@@ -1,67 +1,86 @@
[[connect-to-elasticsearch]]
== Add your data
++++
<titleabbrev>Add data</titleabbrev>
++++
== Add data

To start working with your data in {kib}, use one of the many ingest options,
available from the home page.
You can collect data from an app or service,
or upload a file that contains your data. If you're not ready to use your own data,
add a sample data set and give {kib} a test drive.
The best way to add data to the Elastic Stack is to use one of our many integrations,
which are pre-packaged assets that are available for a wide array of popular
services and platforms. With integrations, you can add monitoring for logs and
metrics, protect systems from security threats, and more.

[role="screenshot"]
image::images/addData_home_7.15.0.png[Built-in options for adding data to Kibana: Add data, Add Elastic Agent, Upload a file]

[float]
[[add-data-tutorial-kibana]]
=== Add data

Want to ingest logs, metrics, security, or application data?
Install and configure a Beats data shipper or other module to periodically collect the data
and send it to {es}. You can then use the pre-built dashboards to explore and analyze the data.
All integrations are available in a single view, and
{kib} guides you there from the *Welcome* screen, home page, and main menu.

[role="screenshot"]
image::images/add-data-tutorials.png[Add Data tutorials]
image::images/add-integration.png[Integrations page from which you can choose integrations to start collecting and analyzing data]

[discrete]
=== Add Elastic Agent
NOTE: When an integration is available for both
https://www.elastic.co/guide/en/fleet/master/beats-agent-comparison.html[Elastic Agent and Beats],
the *Integrations* view defaults to the
Elastic Agent integration, if it is generally available (GA).
To show a
Beats integration, use the filter below the side navigation.

*Elastic Agent* is the next generation of
data integration modules, offering
a centralized way to set up your integrations.
[float]
=== Add data with Elastic solutions

A good place to start is with one of our Elastic solutions, which
offer experiences for common use cases.

* *Web site search crawler.*
Discover, extract, and index your web content into App Search engines using the
{app-search-ref}/web-crawler.html[Enterprise Search web site crawler].
Search across Google Drive, GitHub, Salesforce, and many other web services using
{workplace-search-ref}/workplace-search-content-sources.html[Workplace Search content sources].

* *Elastic APM.*
Get logs, metrics, traces, and uptime data into the Elastic Stack.
Integrations are available for popular services and platforms,
such as Nginx, AWS, and MongoDB,
and generic input types like log files.
Refer to {observability-guide}/observability-introduction.html[Elastic Observability]
for more information.

* *Endpoint Security.*
Protect your hosts and send logs, metrics, and endpoint security data
to Elastic Security.
Refer to {security-guide}/ingest-data.html[Ingest data to Elastic Security]
for more information.

With *Fleet*, you can add
and manage integrations for popular services and platforms, providing
an easy way to collect your data, and manage {elastic-agent} installations in standalone or {fleet} mode. The integrations
ship with dashboards and visualizations,
so you can quickly get insights into your data, and {fleet} mode offers several advantages:
[float]
=== Add data with programming languages

* A central place to configure and monitor your {agents}.
Add any data to the Elastic Stack using a programming language,
such as JavaScript, Java, Python, and Ruby.
Details for each programming language library that Elastic provides are in the
https://www.elastic.co/guide/en/elasticsearch/client/index.html[{es} Client documentation].

* An overview of the data ingest in your {es} cluster.
If you are running {kib} on our hosted {es} Service,
click *View deployment details* on the *Integrations* view
to verify your {es} endpoint and Cloud ID, and create API keys for integestion.

* Multiple integrations to collect and transform data.
[float]
=== Add sample data

[role="screenshot"]
image::images/addData_fleet_7.15.0.png[Add data using Fleet]
Sample data sets come with sample visualizations, dashboards, and more to help you
explore {kib} before you add your own data.
In the *Integrations* view, search for *Sample Data*, and then add the type of
data you want.

To get started, refer to
{observability-guide}/ingest-logs-metrics-uptime.html[Ingest logs, metrics, and uptime data with {agent}].
[role="screenshot"]
image::images/add-sample-data.png[eCommerce, flights, and web logs sample data sets that you can explore in Kibana]

[discrete]
[[upload-data-kibana]]
=== Upload a file
=== Upload a data file

If you have a log file or delimited CSV, TSV, or JSON file, you can upload it,
view its fields and metrics, and optionally import it into {es}.
In the *Integrations* view, search for *Upload a file*, and then drop your file on the target.

NOTE: This feature is not intended for use as part of a repeated production
process, but rather for the initial exploration of your data.
By default, you can upload a file up to 100 MB. This value is configurable up to 1 GB in
<<fileupload-maxfilesize,Advanced Settings>>.

You can upload a file up to 100 MB. This value is configurable up to 1 GB in
<<fileupload-maxfilesize,Advanced Settings>>. To upload a file with geospatial
data, refer to <<import-geospatial-data,Import geospatial data>>.
NOTE: The upload feature is not intended for use as part of a repeated production
process, but rather for the initial exploration of your data.

[role="screenshot"]
image::images/add-data-fv.png[Uploading a file in {kib}]
Expand All @@ -70,22 +89,16 @@ The {stack-security-features} provide roles and privileges that control which
users can upload files. To upload a file in {kib} and import it into an {es}
index, you'll need:

* `all` {kib} privileges for *Discover*
* `manage_pipeline` or `manage_ingest_pipelines` cluster privilege
* `create`, `create_index`, `manage`, and `read` index privileges for the index
* `all` {kib} privileges for *Discover* and *Data Views Management*

You can manage your roles, privileges, and spaces in **{stack-manage-app}** in
{kib}. For more information, refer to
<<xpack-kibana-role-management,{kib} role management>>.
You can manage your roles, privileges, and spaces in **{stack-manage-app}**.

[discrete]
=== Additional options for loading your data

If the {kib} ingest options don't work for you, you can index your
data into Elasticsearch with {ref}/getting-started-index.html[REST APIs]
or https://www.elastic.co/guide/en/elasticsearch/client/index.html[client libraries].
After you add your data, you're required to create a <<data-views,data view>> to tell
{kib} where to find the data.
=== What's next?

* To add data for Elastic Observability, refer to {observability-guide}/add-observability-data.html[Send data to Elasticsearch].
* To add data for Elastic Security, refer to https://www.elastic.co/guide/en/security/current/ingest-data.html[Ingest data to Elastic Security].
To take your investigation
to a deeper level, use <<discover, **Discover**>> and quickly gain insight to your data:
search and filter your data, get information about the structure of the fields,
and analyze your findings in a visualization.
Binary file modified docs/setup/images/add-data-fv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/setup/images/add-data-tutorials.png
Binary file not shown.
Binary file added docs/setup/images/add-integration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/setup/images/add-sample-data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/setup/images/addData_fleet_7.15.0.png
Binary file not shown.
Binary file removed docs/setup/images/addData_home_7.15.0.png
Binary file not shown.
Binary file added docs/setup/images/integration-filter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class BookEmbeddable
}

public async reload() {
this.attributes = await this.attributeService.unwrapAttributes(this.input);
this.attributes = (await this.attributeService.unwrapAttributes(this.input)).attributes;

this.updateOutput({
attributes: this.attributes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,13 @@ export class BookEmbeddableFactoryDefinition
});
}

private async unwrapMethod(savedObjectId: string): Promise<BookSavedObjectAttributes> {
private async unwrapMethod(
savedObjectId: string
): Promise<{ attributes: BookSavedObjectAttributes }> {
const { savedObjectsClient } = await this.getStartServices();
const savedObject: SimpleSavedObject<BookSavedObjectAttributes> =
await savedObjectsClient.get<BookSavedObjectAttributes>(this.type, savedObjectId);
return { ...savedObject.attributes };
return { attributes: { ...savedObject.attributes } };
}

private async saveMethod(attributes: BookSavedObjectAttributes, savedObjectId?: string) {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
"@types/kbn__analytics": "link:bazel-bin/packages/kbn-analytics/npm_module_types",
"@types/kbn__apm-config-loader": "link:bazel-bin/packages/kbn-apm-config-loader/npm_module_types",
"@types/kbn__apm-utils": "link:bazel-bin/packages/kbn-apm-utils/npm_module_types",
"@types/kbn__cli-dev-mode": "link:bazel-bin/packages/kbn-cli-dev-mode/npm_module_types",
"@types/kbn__i18n": "link:bazel-bin/packages/kbn-i18n/npm_module_types",
"@types/kbn__i18n-react": "link:bazel-bin/packages/kbn-i18n-react/npm_module_types",
"@types/license-checker": "15.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ filegroup(
"//packages/kbn-analytics:build_types",
"//packages/kbn-apm-config-loader:build_types",
"//packages/kbn-apm-utils:build_types",
"//packages/kbn-cli-dev-mode:build_types",
"//packages/kbn-i18n:build_types",
"//packages/kbn-i18n-react:build_types",
],
Expand Down
7 changes: 4 additions & 3 deletions packages/elastic-eslint-config-kibana/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("//src/dev/bazel:index.bzl", "pkg_npm")

PKG_BASE_NAME = "elastic-eslint-config-kibana"
PKG_REQUIRE_NAME = "@elastic/eslint-config-kibana"
Expand All @@ -24,7 +25,7 @@ NPM_MODULE_EXTRA_FILES = [
"README.md",
]

DEPS = [
RUNTIME_DEPS = [
"//packages/kbn-babel-preset",
"//packages/kbn-dev-utils",
"@npm//eslint-config-prettier",
Expand All @@ -36,7 +37,7 @@ js_library(
srcs = NPM_MODULE_EXTRA_FILES + [
":srcs",
],
deps = DEPS,
deps = RUNTIME_DEPS,
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-babel-code-parser/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
load("//src/dev/bazel:index.bzl", "jsts_transpiler")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm")

PKG_BASE_NAME = "kbn-babel-code-parser"
PKG_REQUIRE_NAME = "@kbn/babel-code-parser"
Expand Down
7 changes: 4 additions & 3 deletions packages/kbn-babel-preset/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("//src/dev/bazel:index.bzl", "pkg_npm")

PKG_BASE_NAME = "kbn-babel-preset"
PKG_REQUIRE_NAME = "@kbn/babel-preset"
Expand All @@ -24,7 +25,7 @@ NPM_MODULE_EXTRA_FILES = [
"README.md",
]

DEPS = [
RUNTIME_DEPS = [
"@npm//@babel/plugin-proposal-class-properties",
"@npm//@babel/plugin-proposal-export-namespace-from",
"@npm//@babel/plugin-proposal-nullish-coalescing-operator",
Expand All @@ -46,7 +47,7 @@ js_library(
srcs = NPM_MODULE_EXTRA_FILES + [
":srcs",
],
deps = DEPS,
deps = RUNTIME_DEPS,
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand Down
26 changes: 22 additions & 4 deletions packages/kbn-cli-dev-mode/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
load("//src/dev/bazel:index.bzl", "jsts_transpiler")
load("@npm//@bazel/typescript:index.bzl", "ts_config")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")

PKG_BASE_NAME = "kbn-cli-dev-mode"
PKG_REQUIRE_NAME = "@kbn/cli-dev-mode"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__cli-dev-mode"

SOURCE_FILES = glob(
[
Expand Down Expand Up @@ -103,7 +104,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
deps = RUNTIME_DEPS + [":target_node"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand All @@ -122,3 +123,20 @@ filegroup(
],
visibility = ["//visibility:public"],
)

pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = TYPES_PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)

filegroup(
name = "build_types",
srcs = [
":npm_module_types",
],
visibility = ["//visibility:public"],
)
1 change: 0 additions & 1 deletion packages/kbn-cli-dev-mode/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@kbn/cli-dev-mode",
"main": "./target_node/index.js",
"types": "./target_types/index.d.ts",
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0",
"private": true,
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-react-field/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ RUNTIME_DEPS = [
]

TYPES_DEPS = [
"//packages/kbn-babel-preset",
"//packages/kbn-i18n",
"@npm//tslib",
"@npm//@types/jest",
Expand Down
3 changes: 0 additions & 3 deletions packages/kbn-rule-data-utils/src/technical_field_names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const KIBANA_NAMESPACE = 'kibana' as const;
const ALERT_NAMESPACE = `${KIBANA_NAMESPACE}.alert` as const;
const ALERT_RULE_NAMESPACE = `${ALERT_NAMESPACE}.rule` as const;

const CONSUMERS = `${KIBANA_NAMESPACE}.consumers` as const;
const ECS_VERSION = 'ecs.version' as const;
const EVENT_ACTION = 'event.action' as const;
const EVENT_KIND = 'event.kind' as const;
Expand Down Expand Up @@ -85,7 +84,6 @@ const namespaces = {
};

const fields = {
CONSUMERS,
ECS_VERSION,
EVENT_KIND,
EVENT_ACTION,
Expand Down Expand Up @@ -187,7 +185,6 @@ export {
ALERT_START,
ALERT_SYSTEM_STATUS,
ALERT_UUID,
CONSUMERS,
ECS_VERSION,
EVENT_ACTION,
EVENT_KIND,
Expand Down
Loading

0 comments on commit 01476a8

Please sign in to comment.