Skip to content

Commit

Permalink
Merge branch 'master' into elastic#98760
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed May 25, 2021
2 parents 1a49347 + aa2f5b5 commit b20aa9f
Show file tree
Hide file tree
Showing 280 changed files with 3,176 additions and 2,467 deletions.
129 changes: 84 additions & 45 deletions api_docs/alerting.json

Large diffs are not rendered by default.

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.
135 changes: 135 additions & 0 deletions dev_docs/tutorials/building_a_kibana_distributable.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
---
id: kibDevTutorialBuildingDistributable
slug: /kibana-dev-docs/tutorial/building-distributable
title: Building a Kibana distributable
summary: Learn how to build a Kibana distributable
date: 2021-05-10
tags: ['kibana', 'onboarding', 'dev', 'tutorials', 'build', 'distributable']
---

On the course of that tutorial it will be possible to learn more about how we can create a Kibana distributable
as well as handle its different main configurations.

At any given point, you can get CLI help running the following command:

```bash
yarn build --help
```

## Prerequisites

For the basic steps of the build we only require you to use one of the following operating systems:

- Linux
- macOS

However if as part of the build you also want to generate Linux installation packages (deb, rpm) or Docker images there
are other dependencies to have in mind as those installation packages and Docker images generation are run using fpm, dpkg, rpm, and Docker.

### For Linux Installation Packages Build

Please make sure you have the following dependencies installed:

#### Install FPM dependencies

**On OSX/macOS:**

```bash
brew install gnu-tar rpm
```

**On Red Hat systems (Fedora 22 or older, CentOS, etc):**

```bash
yum install ruby-devel gcc make rpm-build rubygems
```

**On Fedora 23 or newer:**

```bash
dnf install ruby-devel gcc make rpm-build libffi-devel
```

**On Oracle Linux 7.x systems:**

```bash
yum-config-manager --enable ol7_optional_latest
yum install ruby-devel gcc make rpm-build rubygems
```

**On Debian-derived systems (Debian, Ubuntu, etc):**

```bash
apt-get install ruby ruby-dev rubygems build-essential
```

#### Install FPM

Finally install fpm with the gem tool with:

```bash
gem install fpm -v 1.5.0
```

### For Docker Images Build

For Docker, the installation instructions can be found at [Install Docker Engine](https://docs.docker.com/engine/install/).


## Create a Kibana distributable

In a great majority of the use cases where we need to build a Kibana distributable, we just need the archives containing the
node executable and the bundled code of the application.

By doing that Linux installation packages and Docker images will be excluded and as a result, the build will be quicker.

We can do it by simply running:

```bash
yarn build --skip-os-packages
```

Note that we used `--skip-os-packages` which will skip the OS packages build.

> In case you are testing something and running that same command a couple of times, `--skip-node-download` can be used
to speed up the process by a little.

At the end of the process a Kibana distributable was created in a `target` folder created relative to your repository checkout.
The folder will look like the following:

![Target Folder Outlook With a Kibana Distributable](../assets/target_folder_with_simple_kibana_distributable.png)

## Controlling the log levels

By default, when building the distributable, the `debug` log level will be used across all the steps.
That default setting should give us a good amount of information about the tasks being done.

To turn it off you can run the build along `--no-debug` flag. At that point that information will no longer be printed out.

For a longer and verbose logging than `debug` there is other option that can be passed along the build command which is `--verbose`.

## Create a Kibana distributable with Linux installation packages and Docker images

If you comply with every prerequisite and dependency listed above, then there is also the option to create a Kibana distributable along with
Linux installation packages like rpm and deb or Docker images.

To achieve it, you can run:

```bash
yarn build
```

At the end you will get the Kibana distributable archives plus the Docker images and both an rpm and a deb package.

To specify just a single installation package or Docker images to build instead of all of them you can add rpm, deb or docker-images as an argument:

```bash
yarn build --deb
yarn build --rpm
yarn build --docker-images
```

Again the distributable contents resulting from running the build command can be found in a `target` folder created relative to the repository after the build completes.
It will look something like:

![Target Folder Outlook With a Kibana Distributable And OS Packages](../assets/target_folder_with_a_kibana_distributable_and_os_packages.png)
1 change: 1 addition & 0 deletions docs/concepts/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ image:concepts/images/refresh-every.png["section of time filter where you can co


[float]
[[semi-structured-search]]
==== Semi-structured search

Combine free text search with field-based search using the Kibana Query Language (KQL).
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/getting-started/monorepo-packages.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ yarn kbn watch-bazel
- @kbn/i18n
- @kbn/legacy-logging
- @kbn/logging
- @kbn/securitysolution-constants
- @kbn/securitysolution-es-utils
- kbn/securitysolution-io-ts-alerting-types
- kbn/securitysolution-io-ts-list-types
- kbn/securitysolution-io-ts-types
- @kbn/securitysolution-io-ts-utils
- @kbn/securitysolution-list-api
- @kbn/securitysolution-list-constants
- @kbn/securitysolution-list-hooks
- @kbn/securitysolution-list-utils
- @kbn/securitysolution-utils
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ which will load the visualization's editor.
|{kib-repo}blob/{branch}/x-pack/plugins/alerting/README.md[alerting]
|The Kibana alerting plugin provides a common place to set up alerts. You can:
|The Kibana Alerting plugin provides a common place to set up rules. You can:
|{kib-repo}blob/{branch}/x-pack/plugins/apm/readme.md[apm]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ export interface ChromeNavLinks
| [getNavLinks$()](./kibana-plugin-core-public.chromenavlinks.getnavlinks_.md) | Get an observable for a sorted list of navlinks. |
| [has(id)](./kibana-plugin-core-public.chromenavlinks.has.md) | Check whether or not a navlink exists. |
| [showOnly(id)](./kibana-plugin-core-public.chromenavlinks.showonly.md) | Remove all navlinks except the one matching the given id. |
| [update(id, values)](./kibana-plugin-core-public.chromenavlinks.update.md) | Update the navlink for the given id with the updated attributes. Returns the updated navlink or <code>undefined</code> if it does not exist. |

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion docs/development/core/public/kibana-plugin-core-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [ChromeBreadcrumb](./kibana-plugin-core-public.chromebreadcrumb.md) | |
| [ChromeHelpExtensionLinkBase](./kibana-plugin-core-public.chromehelpextensionlinkbase.md) | |
| [ChromeHelpExtensionMenuLink](./kibana-plugin-core-public.chromehelpextensionmenulink.md) | |
| [ChromeNavLinkUpdateableFields](./kibana-plugin-core-public.chromenavlinkupdateablefields.md) | |
| [FatalErrorsStart](./kibana-plugin-core-public.fatalerrorsstart.md) | FatalErrors stop the Kibana Public Core and displays a fatal error screen with details about the Kibana build and the error. |
| [HttpStart](./kibana-plugin-core-public.httpstart.md) | See [HttpSetup](./kibana-plugin-core-public.httpsetup.md) |
| [IToasts](./kibana-plugin-core-public.itoasts.md) | Methods for adding and removing global toast messages. See [ToastsApi](./kibana-plugin-core-public.toastsapi.md)<!-- -->. |
Expand Down
9 changes: 5 additions & 4 deletions docs/discover/save-search.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ image::discover/images/read-only-badge.png[Example of Discover's read only acces
If the saved search is associated with a different index pattern than is currently
selected, opening the saved search changes the selected index pattern. The query language
used for the saved search is also automatically selected.
. To add your search results to an existing dashboard:
.. Open the dashboard, then click *Edit*.
. To add your search results to a dashboard:
.. Open the main menu, then click *Dashboard*.
.. Open or create the dashboard, then click *Edit*.
.. Click *Add from library*.
.. Open the *Types* menu, then select *Saved search*.
.. Select the the saved search that you want.
.. From the *Types* dropdown, select *Saved search*.
.. Select the saved search that you want to visualize, then click *X* to close the list.
2 changes: 1 addition & 1 deletion docs/maps/connect-to-ems.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ services:
{hosted-ems}:
image: {ems-docker-image}
volumes:
- ./elastic-maps-server.yml:/usr/src/app/config/elastic-maps-server.yml
- ./elastic-maps-server.yml:/usr/src/app/server/config/elastic-maps-server.yml
--------------------------------------------

[float]
Expand Down
6 changes: 6 additions & 0 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,12 @@ out through *Advanced Settings*. *Default: `true`*
| Set this value to true to allow Vega to use any URL to access external data
sources and images. When false, Vega can only get data from {es}. *Default: `false`*

| `xpack.discoverEnhanced.actions.exploreDataInContextMenu.enabled`
| Enables the *Explore underlying data* option that allows you to open *Discover* from a dashboard panel and view the panel data. *Default: `false`*

| `xpack.discoverEnhanced.actions.exploreDataInChart.enabled`
| Enables you to view the underlying documents in a data series from a dashboard panel. *Default: `false`*

| `xpack.license_management.enabled`
| Set this value to false to
disable the License Management UI. *Default: `true`*
Expand Down
31 changes: 7 additions & 24 deletions docs/user/dashboard/aggregation-based.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ create visual art for a specific topic.

Choose the type of visualization you want to create, then use the editor to configure the options.

. From the dashboard, click *Create panel*, then click *Aggregation based* on the *New visualization* window.
. On the dashboard, click *All types > Aggregation based*.

.. Click the type of visualization you want to create.
.. Select the visualization type you want to create.

.. Click the data source you want to visualize.
.. Select the data source you want to visualize.

. From the editor, add the <<aggregation-reference,aggregations>> you want to visualize, then click *Update*.
. Add the <<aggregation-reference,aggregations>> you want to visualize using the editor, then click *Update*.
+
NOTE: For the *Date Histogram* to use an *auto interval*, the date field must match the primary time field of the index pattern.

. To change the order, drag the aggregations along the editor.
. To change the order, drag and drop the aggregations in the editor.
+
[role="screenshot"]
image:images/bar-chart-tutorial-3.png[Option to change the order of aggregations]
Expand Down Expand Up @@ -137,13 +137,9 @@ Add the sample web logs data that you'll use to create the bar chart, then creat

Open the bar chart visualization builder and change the time range.

. On the dashboard, click *Create panel*.
. On the dashboard, click *All types > Aggregation based*, select *Vertical bar*, then select *kibana_sample_data_logs*.

. On the *New visualization* window, click *Aggregation based > Vertical bar*.

. On the *Choose a source* window, click *kibana_sample_data_logs*.

. Change the <<set-time-filter, time filter>>> to *Last 7 days*.
. Make sure the <<set-time-filter, time filter>>> is *Last 7 days*.

[float]
[[tutorial-configure-the-bar-chart]]
Expand Down Expand Up @@ -177,19 +173,6 @@ TIP: Aggregation-based panels support a maximum of three *Split series*.
[role="screenshot"]
image:images/bar-chart-tutorial-2.png[Bar chart with sample logs data]

[float]
===== Save the panel

Save and add the visualization panel to the dashboard.

. From the toolbar, click *Save*.

. Enter the *Title* and optional *Description*.

. From the *Tags* drop down, select any applicable tags.

. Select *Add to Dashboard after saving*.

. Click *Save and return*.


Expand Down
4 changes: 2 additions & 2 deletions docs/user/dashboard/create-panels-with-editors.asciidoc
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[[create-panels-with-editors]]
== Create panels with editors

{kib} provides several editors that you can use to create dashboard panels.
{kib} provides several editors that you can use to create panels of your data.

[cols="2"]
|===

| <<lens,*Lens*>>
| Create visualizations with the drag and drop editor. *Lens* is recommended for most users.
| Create visualizations with the drag and drop editor.

| <<maps,*Maps*>>
| Create visualizations with your geographical data.
Expand Down
Loading

0 comments on commit b20aa9f

Please sign in to comment.