Commit graph

478 commits

Author SHA1 Message Date
kibanamachine
cedbed9757 [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs' 2023-07-23 16:07:09 +02:00
Drew Tate
092e988df2
[Lens][Event annotations] Move logic into packages (#161500) 2023-07-19 09:46:57 -05:00
Walter Rafelsberger
11cc1e1be6
[ML] AIOps: Rename Explain Log Rate Spikes to Log Rate Analysis. (#161764)
## Summary

Part of #161832.

This PR renames the Explain Log Rate Spikes feature to **Log Rate
Analysis**.

- [x] Renamed references in `docs/developer/*`
- [x] Updated docs screenshots
- [x] Redirect in docs
- [x] Redirect urls from `explain_log_rate_spikes` to `log_rate_analysis`
- [x] API versioning
- [x] Renamed navigation links
- [x] Renamed variable names
- [x] Renamed file names
- [x] Renamed i18n ids
- [x] Renamed breadcrumbs 
- [x] Removed hard coded `AIOPS_ENABLED` feature flag
2023-07-19 16:46:31 +02:00
Sergi Massaneda
f2e773d435
[SecuritySolution] Rename security solution plugins (#161153)
## Summary

closes: https://github.com/elastic/kibana/issues/159685

- Renaming _x-pack/plugins_:
`serverless_security` -> `security_solution_serverless`
`ess_security` -> `security_solution_ess`

- All the related configurations and types have also been renamed.
- i18n translation prefixes updated
- relocation of internal `security_solution_serverless` directories to
be consistent with `security_solution_ess`

### Eslint
I also added the plugins in the `.eslintrc` configuration, defining the
same rules as the `security_solution` plugin.
All eslint errors have been addressed (mainly _type_ imports errors)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-05 13:51:49 +02:00
Marco Antonio Ghiani
abe58cb011
[Logs Shared] Move LogStream and LogView into new shared plugin (#161151)
## 📓 Summary

Closes #159128 

Due to a dependencies issue when disabling a plugin in serverless mode,
the LogStream feature and related logic were disabled for every
consumer.

We decided to split this shared component and endpoint into their own
plugin of shared logs utilities, reducing to the minimum the required
dependency that could disable the plugin.

What we moved can be summarized with:
- `infrastructure-monitoring-log-view` saved object definition and
registration
- LogViews server/client services (exposed with start contract) +
related endpoints
- LogEntries server service + related endpoints
- LogEntriesDomain logic (exposed with start contract)
- `<LogStream />` component
- `<ScrollableLogTextStreamView />` component and related logic
- LogView state machine
- Containers/Hooks to consume the moved APIs.
- Common types/utils definition, now exported and consumed as a
dependency from the `infra` plugin.

## 🤓 Review hints

Most of the changes are just renaming and moving stuff into the new
plugin, but for some operations was required to implement new logic,
which may deserve a more critical review:
- server/public `plugin.ts` files for the `infra` and `logs_shared`
plugins. The new plugin now registers the fallback actions to retrieve a
source configuration if there's no stored log view. It also set the
configuration for the message field and registers the log view saved
object.
- the `logEntriesDomain` has also been moved inside the new plugin, but
is also used by the logs-analysis endpoints, so it is exposed by the
logs_shared plugin and consumed by `infra`.

## 👣 Following steps

We currently are still using the `observability` plugin for consuming
the CoPilot feature on our LogsStream flyout.
The plugin dependency is marked as optional, so disabling the
`observability` plugin in a serverless environment won't disable also
the exposed features in this new plugin, but it'll affect only the
CoPilot feature, which won't be loaded.

In future, would be nice to extract the CoPilot feature into its own
package/plugin, so that also serverless projects can consume it without
depending on `observability.

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-05 10:30:28 +02:00
Ignacio Rivas
ec620e7fb3
[Deployment Management] Add cards navigation in management landing page for serverless (#160096) 2023-06-30 11:27:56 +02:00
Marco Antonio Ghiani
6a0d6deaa6
[Logs+] Implement Logs Dataset selector (#159907)
## 📓  Summary

Closes https://github.com/elastic/observability-dev/issues/2655

This PR introduces a customized log consumption experience in the
Discover plugin. By leveraging the new `discover_log_explorer` plugin
and utilizing the `discover.customize` functionality, we have curated a
more tailored user experience.

The key feature of this implementation is the `DatasetSelector`
component, which replaces the original Discover `DataViewPicker`. It
handles the retrieval, rendering, and navigation of integrations and
data streams related to logs, providing an improved user interface.

This PR involves significant development efforts, including the creation
of the `discover_log_explorer` plugin, implementation of services, state
machines, custom hooks, and enhancements to presentational components.
The following overview will help reviewers understand the
responsibilities of each component in this implementation.


d725b699-452e-4718-8189-8dc1fab4d044

## DatasetsService & DatasetsClient

The DatasetsService is introduced, a crucial component that mediates
access to the newly implemented DatasetsClient. During the plugin's
lifecycle, the DatasetsService exposes a client property through its
start() method, providing convenient access to a DatasetsClient
instance.

The DatasetsClient is responsible for abstracting the data fetching
process for two endpoints: the integrations endpoint and the data
streams listing endpoint. These endpoints are utilized to populate the
selector options in the user interface. To facilitate this, the
DatasetsClient exposes the findIntegrations and findDatasets methods,
which handle the respective data fetching.

## Discover Customization

The critical part of this work consists of where the customization is
applied.
Inside the `public/plugin.tsx`, we lazy load and create, injecting the
required dependencies, the `CustomDatasetSelector`, which already
encapsulates all the logic required to make the selector work with the
external APIs.
We kept separating the data fetching logic from how the selector works,
and all the data and events are passed into the UI component with
properties.

```ts
discover.customize(
  DISCOVER_LOG_EXPLORER_PROFILE_ID,
  ({ customizations, stateContainer }) => {

    customizations.set({
      id: 'search_bar',
      CustomDataViewPicker: createLazyCustomDatasetSelector({
        datasetsClient: datasetsService.client,
        stateContainer,
      }),
    });
    ...
```

## Data fetching state machines & custom hooks

To handle the data fetching of integrations and unmanaged data streams,
we created two different state machines to separately handle the related
action for each dataset, such as remote search, in-memory search, error
handling etc.

### Integration machine and useIntegrations

The integrations state machine handles automatic data fetching of the
resources and additionally provides transitions for loading more
integrations, searching integrations by HTTP request, searching locally
into integration streams, and all the related loading and error handling
states.

It is then interpreted inside the `useIntegrations` custom hook, which
exposes the fetched data and handlers for all the above-mentioned
actions.

<img width="1975" alt="Screenshot 2023-05-30 at 09 44 42"
src="6daeca9f-826d-4a0f-bd90-eb4826ed1bde">


### Datasets machine and useDatasets

Similar to the integrations state machine, but simplified since the data
streams search can only happen with HTTP requests and there is no
pagination that requires to handle the load of more entries.

It is interpreted inside the `useDatasets` custom hook, which also
exposes the fetched data and handlers for the available actions.

<img width="1692" alt="Screenshot 2023-05-30 at 09 45 11"
src="5f9690e2-4e8f-439e-9ffd-f3b34cf3eaf5">

## DatasetSelector

The `DatasetSelector` component contains all the logic that manages the
navigation and searches across the different panels that render
integrations, integrations' streams or unmanaged streams.
As the datasets come from different APIs or are performed in-memory, the
search work follow this logic:
- When listing the integrations list (first level of the
`EuiContextMenu`), the search is done with an HTTP request.
- When listing the data streams list for a specific integration (second
level of the `EuiContextMenu`), the search is done in-memory, filtering
and sorting directly in the client.
- When listing the unmanaged data streams list (second level of the
`EuiContextMenu`), the search is done again with an HTTP request.

To handle these possible user journeys correctly without side effects,
we created another state machine and exposed its actions with an
internal `useDatasetSelector` custom hook.

<img width="1978" alt="Screenshot 2023-05-30 at 09 46 04"
src="84aa4247-c65d-40de-9eb6-6117bee731f8">

## Next steps

This component will change quite a lot until we won't get to a final
design. As soon as a first solid mvp is defined for production, a
complete test for the component will be implemented, among with a more
generic functional test for the core customization features.

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2023-06-28 15:20:44 +02:00
Shahzad
1ca19ce2c7
[Synthetics/Uptime] Better code separation (#160245)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-26 17:47:04 +02:00
Julia Rechkunova
7f0d57d9fd
[UnifiedFieldList] Convert from a plugin into a package (#158718)
- Closes https://github.com/elastic/kibana/issues/149336

## Summary

This PR converts `unifiedFieldList` plugin into a new
`@kbn/unified-field-list` package.

Had to also move some deps:
- from `uiActions` plugin to the existing `@kbn/ui-actions-browser`
package
- from `data` plugin to a new `@kbn/data-service` package

Please test that Field Stats from the package are still working on your
pages.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-23 14:28:12 +02:00
Jon
b8c36e11b1
Upgrade Node.js to 16.20.1 (#160177)
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V16.md#16.20.1
2023-06-21 16:57:55 -05:00
Cauê Marcondes
c87e4e983d
[Profiling] Making plugin Production ready (#159738)
This PR does:

- checks Kibana.spec file
- Checks server feature.ts
- Adds correct route access to APIs
- Removes unnecessary logs
- Removes collector and symbolized `secret_token` from config schema as
it won't be used
- Add README file

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-19 06:35:59 -07:00
Thomas Watson
11bcdb7606
[docs] remove invalid arg from scripts/generate_plugin example (#159466) 2023-06-14 12:07:18 +02:00
Anton Dosov
d082d78e60
[Drift] Add chat to management and home getting started (#159121)
## Summary

Partially address https://github.com/elastic/kibana/issues/158835, add
cloud chat (drift) to more places: all management pages and
home/getting_started page

I hit an issue that both management and home couldn't depend directly on
`cloudChat` plugin. Here is the issue with more details
https://github.com/elastic/kibana/issues/159008. I worked around with
creating an intermediate `cloudChatProvider` plugin.


![Screenshot 2023-06-05 at 15 46
44](a051be0c-b5f0-437d-9e52-507643c14aba)

![Screenshot 2023-06-05 at 16 03
06](b3b705da-c8c7-4bb6-9e85-b4adefa583a6)

How do I run drift locally? 

Add this to kibana.yml


```
xpack.cloud.id: "some-id"
xpack.cloud.trial_end_date: "2023-06-21T00:00:00.000Z"

xpack.cloud_integrations.chat.enabled: true
xpack.cloud_integrations.chat.chatURL: "https://elasticcloud-production-chat-us-east-1.s3.amazonaws.com/drift-iframe.html"
xpack.cloud_integrations.chat.chatIdentitySecret: "some-secret" (get it from drift console)
```

You need to have access to our drift account. But I tested with a custom
account. To change account id I had to point
`xpack.cloud_integrations.chat.chatURL` to a script with custom drift
id.
2023-06-13 14:10:49 +02:00
Thomas Watson
70472fd42a
[docs] improve external plugin documentation (#159431)
Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2023-06-12 09:09:02 -04:00
Pablo Machado
88aa68aec8
[Security Solution][Serverless] PLI features base architecture (#158179)
[Documentation](https://docs.google.com/document/d/1Ms8d8d_fbTTRHlBroEAKGNMNk3jFFgOAkVDRhqLxAPQ/edit?pli=1#)


issue: https://github.com/elastic/kibana/issues/158810
## Summary

This PR is a cleanup to make [this
POC](https://github.com/elastic/kibana/pull/155420) production ready

- Serverless PLI features splitting in Security Solution, to allow/deny
access to configured functionalities, using the current Kibana RBAC
service.
- Create the Upselling service to display Serveless-specific prompts in
the application when features are not available
- Create a `SecurityRoutePageWrapper` component that wraps Pages and
displays the upsell when necessary.
- We will refactor the code base to use `SecurityRoutePageWrapper`
everywhere on another PR.
- Create an Upsell page and section for entity analytics


bd8db822-2f4b-4545-9da7-bedc07d93f90


### test:
Serverless: `yarn serverless-security`. 
* To change the product line you have to update
`xpack.serverless.security.productLineIds` on
`config/serverless.security.yml`.

ESS: `yarn start`


### Glossary
* PLI - Product Line Item (`Alert Triage`, `Osquery`, `Cases` , ... )
* Product Line - The product that the user is subscribed to (Security
Essentials, Security Complete, ...)
* essSecurity - New plugin with code that only runs for ESS offer
(non-serverless).
* App Feature - A security solution feature or group of features that
can be disabled for a product line. It can be mapped to PLIs (`Alert
Triage`, `Osquery`, `Cases` , ... ).
* Capability - A string that when present represents that the user can
access a given feature. A capability could be of the type UI or API
(`read_cases`, `crud_cases`, ...).


### Current architecture

![Security
Features](https://user-images.githubusercontent.com/17747913/233414697-231940c2-7790-485b-9403-e971351fa655.jpg)

### New architecture

![Serverless Security
Features](https://user-images.githubusercontent.com/17747913/233414733-1fc0eef1-be20-46ef-8692-bc80867326d1.jpg)

### How does it work?
Every serverless product line (endpointEssentials, cloud essentials) can
define which features are enabled:

69d0fc15f4/x-pack/plugins/serverless_security/common/pli/pli_config.ts (L12-L19)

For ESS (non-serverless) offer we enable all features by default.

69d0fc15f4/x-pack/plugins/ess_security/server/constants.ts (L10-L13)


A feature can define privileges: 

69d0fc15f4/x-pack/plugins/security_solution/server/lib/app_features/security_kibana_features.ts (L177-L185)

When the feature is enabled the privileges get merged into the base
config and injected into kibana features.

69d0fc15f4/x-pack/plugins/security_solution/server/lib/app_features/app_features.ts (L61-L70)


### TODO
- [x] lazy load these components
- [x] Add unit test to:
- ~SecurityRoutePageWrapper
x-pack/plugins/security_solution/public/common/components/security_route_page_wrapper/index.tsx~
-
~x-pack/plugins/security_solution/public/common/hooks/use_upselling.ts~
-
~x-pack/plugins/security_solution/public/common/lib/capabilities/has_capabilities.ts~
-
~x-pack/plugins/security_solution/public/common/lib/upsellings/upselling_service.ts~
  - ~x-pack/plugins/serverless_security/common/pli/pli_features.ts~
-
~x-pack/plugins/serverless_security/public/components/upselling/register_upsellings.tsx~
-
~x-pack/plugins/security_solution/server/lib/app_features/app_features.ts~

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-01 10:40:30 -07:00
Rachel Shen
3746b73f5c
[Reporting] Initial Export types plugin (#158479)
## Summary

Closes https://github.com/elastic/kibana/issues/158512

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
2023-05-31 07:09:23 -07:00
Brad White
0c3ca366a1
Add build_date to kbn:api/status (#157905)
## Summary

Adds build date to `GET kbn:api/status` similar to ES. Example output
running locally:

```json
{
  "name": "ES-DMVD5M3",
  "uuid": "545ba70c-063e-449b-af21-6c8e7b30f77e",
  "version": {
    "number": "8.9.0",
    "build_hash": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "build_number": 9007199254740991,
    "build_snapshot": false,
    "build_date": "2023-05-15T23:12:09.000Z"
  },
  ...rest
}
```


### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios


## Release Note

The status endpoint now returns the build date alongside other build
information.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-25 10:21:47 -07:00
Stratoula Kalafateli
0975ebabd1
[Text based languages] Creates editor reusable component (#158008)
## Summary

Closes https://github.com/elastic/kibana/issues/154330

This PR:
- Moves the editor from unified-search to a standalone package
- The editor has now a core ui settings dependency but is going to have
an expressions dependency too when merged with the ESQL branch
- Adds a new plugin (text-based-languages) which is used to pass the
dependencies on the package. The user can either use this plugin without
giving any dependencies or use the package with passing the dependecies
on the KibanaContextProvider.
- Adds storybook for the editor (I used the mdx stories as we did on the
random sampling package)

<img width="1668" alt="image"
src="763a3112-1ae5-49bb-81f3-acd02892e402">


### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-22 14:27:38 +03:00
Alejandro Fernández Haro
ff6943376d
[Config Service] Expose serverless contextRef (#156837) 2023-05-08 17:39:12 +02:00
Clint Andrew Hall
b217dbf001
[serverless] Create Security Serverless plugin (#156104)
> Derived from https://github.com/elastic/kibana/pull/153274
> Builds upon https://github.com/elastic/kibana/pull/155582

## Summary

This PR creates the Serverless Security plugin, based on the work from
https://github.com/elastic/kibana/pull/153274:

- creates the plugin,
- adds API to hide the solution navigation from Security,
- calls that API if the chrome style is `project`.

<img width="1688" alt="Screenshot 2023-04-27 at 12 37 46 PM"
src="https://user-images.githubusercontent.com/297604/234979670-425bfb12-8194-4916-8f92-efff7804b577.png">

## Next Steps

- render the left nav from https://github.com/elastic/kibana/pull/153274
using an API provided by @elastic/appex-sharedux
  - this low-level API should be coming in the next few days.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-02 05:42:55 -07:00
Clint Andrew Hall
4e88645b59
[serverless] Create Observability Serverless plugin (#156118)
> Derived from https://github.com/elastic/kibana/pull/153274
> Builds upon https://github.com/elastic/kibana/pull/155582

## Summary

This PR creates the Serverless Observability plugin, based on the work
from https://github.com/elastic/kibana/pull/153274:

- creates the plugin,
- adds API to hide the solution navigation from Enterprise Search,
- calls that API if the chrome style is `project`.

<img width="1610" alt="Screenshot 2023-04-27 at 5 03 44 PM"
src="https://user-images.githubusercontent.com/297604/234990765-d6770650-41b3-4e94-ad7f-c6a22778d39a.png">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-01 09:27:32 +02:00
Clint Andrew Hall
965b327ca6
[serverless] Create Search Serverless plugin (#156037) 2023-04-27 21:49:59 -04:00
Drew Tate
0832ae27a0
Visualization UI components package (#155459)
## Summary

Moves a series of Lens components to an independent plugin for reuse in
the annotations library.


### Checklist

Delete any items that are not applicable to this PR.
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] remove mentions of Lens

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-27 15:53:39 -05:00
Clint Andrew Hall
8e37b38417
[serverless] Create the Serverless Plugin (#155582)
> Derived from https://github.com/elastic/kibana/pull/153274 for
production.

## Summary

This PR creates the `serverless` plugin for Kibana Serverless projects.


![image](https://user-images.githubusercontent.com/297604/233892935-b3713575-a2f7-4e82-a9dd-e8c11823683f.png)


It uses the methodology proven out in the proof-of-concept
(https://github.com/elastic/kibana/pull/153274) and prepares it for
production:

- Adds chrome style and related API to the `chrome` services.
- Creates the `serverless` plugin.
- Invokes the new chrome style API for all serverless projects.
- Alters `yarn` scripts to support all project types, and switching
between them.
- Creates the new "Project Switcher" component for use in the new chrome
header for Serverless.
- Creates a Storybook config for this and future components.
- Adds API endpoint to trigger project switching and `Watcher` restarts.

<img width="1598" alt="Screenshot 2023-04-26 at 10 44 01 AM"
src="https://user-images.githubusercontent.com/297604/234612654-fdcf38ea-8c48-4066-bc85-507f40c984aa.png">


## Next steps

- [x] Creating a PR for enabling/disabling related plugins for
Serverless. (https://github.com/elastic/kibana/pull/155583)
- [ ] Creating product plugin PR based on
https://github.com/elastic/kibana/pull/153274.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-26 11:48:23 -07:00
Oliver Gupte
077245606b
[APM] Create plugin for logs onboarding (#154728)
Closes #154733

Creates a new plugin for logs onboarding with wizard to organize steps
into discrete views.

#### TODO:
- [x] rename plugin to observability_onboarding
- [x] configure: UI and server plugin
- [x] enable/disable new plugin
- [x] remove the link to it from Observability nav

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yngrid Coello <yngrid.coello@elastic.co>
Co-authored-by: Yngrid Coello <yngrdyn@gmail.com>
2023-04-25 11:14:21 -04:00
Lisa Cawley
5120d692c8
[DOCS] Remove or move book-scoped attributes (#155210) 2023-04-20 09:12:09 -07:00
Yngrid Coello
153e1fcf45
[APM] plugin description (#155041)
While I was checking [some
documentation](https://www.elastic.co/guide/en/kibana/current/plugin-list.html)
I discovered APM plugin description was `undefined`

<img width="1847" alt="image"
src="https://user-images.githubusercontent.com/1313018/231450602-926abacc-b915-42dd-88fb-462643cc8dc1.png">
2023-04-19 09:49:10 +01:00
Coen Warmer
26f65b3262
[Observability] Add Observability Shared app (#154716)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-11 21:51:59 +02:00
Tiago Costa
66ac756b98
fix(NA): external plugins development flow with the new modern package plugins in place (#153562)
This PR fixes the 3rd party external plugin development workflow by
introducing a dev step for plugins that allows for development usages of
those with Kibana.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-06 18:00:24 +01:00
Coen Warmer
6b6a8dfecb
[Observability] Copy Exploratory View into a separate app (#153852) 2023-03-29 10:30:58 +02:00
Victor Martinez
e1b12fd61a
docs: interpreting ci failures (#153549)
## Summary

Replace the deprecated Jenkins specifics in the interpreting CI failures
section for something Buildkite specific.

Please bear with me, I'm not much familiar with the implementations but
found the current documentation to be obsoleted.
2023-03-24 17:27:11 +01:00
Jason Rhodes
cae4385744
New asset manager plugin (tech preview, off by default) (#152456)
## Summary

This plugin will contain the asset inventory and topology API in Kibana,
giving Kibana projects access to inventory and topology data via an HTTP
and/or JS API on the server and client.

[Currently proposed API
docs](https://github.com/elastic/o11y-topology-playground/tree/main/docs/api)
will be moved to this repo as well, contained inside this plugin folder,
as a part of this PR.

## Enabling the plugin

This plugin is entirely in "technical preview" and because of this, must
be specifically enabled via config for it to do anything besides being
run by the core plugin framework. To enable the server API layer, as
well as the index template management, put the following line in your
kibana.yml file:

```yml
xpack.assetManager.alphaEnabled: true
```

## Running the API integration tests

Run the functional test server with the asset manager config in place:

```shell
$ node scripts/functional_tests_server --config x-pack/test/api_integration/apis/asset_manager/config.ts
```

Then run the functional test runner with the same config, to target just
these tests:

```shell
$ node scripts/functional_test_runner --config=x-pack/test/api_integration/apis/asset_manager/config.
ts
```

_Note:_ The config file added in this folder enables the tech preview
plugin ([see file
here](https://github.com/elastic/kibana/pull/152456/files#diff-bc00de6c34c9bc131cfbdf3570c487fe9ee947e9a88a84c59d6b139b79d7708eR20)).

### Running the integration tests for verifying that the plugin is
"disabled" by default

There is a small set of tests that confirm that the endpoints return 404
and there is no index template installed if the config value is not set
in the kibana.yml file. To run this suite, use the following config:

```shell
$ node scripts/functional_tests_server --config x-pack/test/api_integration/apis/asset_manager/config_when_disabled.ts
$ node scripts/functional_test_runner --config=x-pack/test/api_integration/apis/asset_manager/config_when_disabled.
ts
```

## Testing this PR with sample data

There are some sample data mechanisms in place inside this PR to allow
us to build out the endpoints.

### View sample docs
```http
GET /api/asset-manager/assets/sample
```

This will return a list of the assets that are included if you elect to
write assets. This is a good endpoint to use to find EAN (Elastic Asset
Name) values that you may want to exclude from writing for a given time
period, to simulate assets appearing/disappearing over time.

### Write sample docs
```http
POST /api/asset-manager/assets/sample
{
  "baseDateTime": "2023-02-28T12:00:00.000Z",
  "excludeEans": ["k8s.cluster:cluster-002"]
}
```

This posts all of the sample asset documents to Elasticsearch using the
`baseDateTime` value as the timestamp. Any valid string or number that
is accepted by `new Date()` should work for `baseDateTime`.

The `excludeEans` value is an array of EAN ("Elastic Asset Name") values
that you don't want to write on this particular run. This way you can
have assets appear (exclude them in the past, don't exclude them during
a later run) or disappear (vice versa) and see how that shows up in
other endpoints.

**Note:** *Remember that when you curl a Kibana server API with a POST
request, you must include a `kbn-xsrf` header with any string value you
want.*

### Get asset docs from ES
```http
GET /api/asset-manager/assets?type=k8s.cluster&from=now-10m
```

This is the primary "real" endpoint available right now. It should
retrieve a list of assets based on the type/from/to/ean filter values
you specify. Once you load the sample data, this endpoint should return
results.

## Debug logging

There are some extra debug logs for ES queries that are running in the
code in this PR. To print those logs to the Kibana server console, run
Kibana using `DEBUG_LOGGER=true`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-03-20 13:31:01 -07:00
Maja Grubic
c69bb77235
[Custom Branding] Update text (#151631)
## Summary

This PR updates text for Custom Branding.
<img width="1505" alt="Screenshot 2023-02-20 at 16 22 10"
src="https://user-images.githubusercontent.com/1937956/220145333-68aedb04-5c57-4dca-aa1f-037a245100ba.png">



### Checklist

Delete any items that are not applicable to this PR.

- [X] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
~- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios~
~- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard
accessibility](https://webaim.org/techniques/keyboard/))~
~- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))~
~- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~
~- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))~
~- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)~


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Vadim Kibana <82822460+vadimkibana@users.noreply.github.com>
2023-03-10 09:45:06 +01:00
Carly Richmond
867c906f6c
Updating debugging docs: replacing apm.dev.js configuration references with kibana.dev.yml (#152237)
## Summary

Updating the Debugging Kibana documentation:

1. Adding Python as additional pre-requisite technology
2. Replacing apm.dev.js configuration with updated kibana.dev.yml
approach

Similar to recent discussion in issue #79490, I've found that the
`apm.dev.js` approach is no longer working.


### Checklist

Delete any items that are not applicable to this PR.

- [X]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

### Risk Matrix

N/A

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-03-08 14:43:34 +00:00
Jill Guyonnet
6dcdabce99
Add details to Fleet README (#152348)
Update the Fleet plugin README
2023-03-02 09:22:45 +01:00
Jon
d41bcb210a
Upgrade Node.js to 16.19.1 (#151527)
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V16.md#16.19.1
2023-02-21 10:40:59 -06:00
Davis McPhee
02af928026
[Unified Histogram] Create layout container to manage Unified Histogram state (#148773)
## Summary

This PR introduces a layout container component to Unified Histogram
which removes the responsibility of state management from the consumer.
The full list of changes includes the following:
- Create a `UnifiedHistogramContainer` component which is responsible
for managing the Unified Histogram state.
- Create a `UnifiedHistogramStateService` to move state management from
React to a dedicated service consumed by the container component.
- Move the state management logic from `use_discover_histogram` to
Unified Histogram so it doesn't need to be reimplemented by each
consumer.
- Create utility functions to access and update Unified Histogram local
storage state.
- Move the edit visualization logic to Unified Histogram so it doesn't
need to be reimplemented by each consumer.
- Add documentation and example usage to the Unified Histogram readme.
- Reorganize the Unified Histogram folder structure.
- Update `useQuerySubscriber` to return the relative time range.

### Checklist

- [ ] ~Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)~
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] ~Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard
accessibility](https://webaim.org/techniques/keyboard/))~
- [ ] ~Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))~
- [ ] ~If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~
- [ ] ~This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))~
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
2023-02-07 15:14:06 -04:00
Andrew Macri
1d0b90bd12
[Security Solution] Data Quality dashboard (#150063)
# [Security Solution] Data Quality dashboard

## Check ECS compatibility with just one click

With just one click, the _Data Quality dashboard_ checks all the indices used by the Security Solution, (or anything else), for compatibility with the [Elastic Common Schema (ECS)](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html)

![checking_data_quality](https://user-images.githubusercontent.com/4459398/215989195-2f5e2126-9ece-4df6-9742-284c73442962.gif)

## Create cases from results

Create a single case containing all the results, or create cases for specific indices

![create_case_from_take_action](https://user-images.githubusercontent.com/4459398/215989342-4489cf68-69d1-4ac4-859c-d849c4778d68.gif)

## Interactive tabs put results in context

Expand any index to reveal interactive tabs

- Summary
- Incompatible fields
- Custom fields
- ECS complaint fields
- All fields

![tabs](https://user-images.githubusercontent.com/4459398/215989435-a363a9e5-8635-42d1-a0f7-5e0ddc6f9515.gif)

## Share comprehensive markdown reports

Share markdown reports containing the same content as the dashboard

![markdown_report](https://user-images.githubusercontent.com/4459398/215989555-72c53ed8-99f9-4be7-9181-6b9f365a8f6e.gif)

### On page load

When the Data Quality dashboard page loads, the alerts index, and any indices matching the selected `Data view` are displayed

![page_load](https://user-images.githubusercontent.com/4459398/215989957-3b4d52f1-eaa4-4d42-9e40-d556602b006b.png)

Only `hot`, `warm`, or `unmanaged` indices are displayed by default

Indices are not checked automatically when the dashboard loads

Click either :

- `Check all` to check all the indices on the page
- The expand button to automatically check (just) one index, and instantly view results

### Check all

When the `Check all` button is clicked

- The `Check all` button changes to a `Cancel` button
- The `Last checked: n <time unit> ago` text is replaced with a progress bar indicating how many Indices are left to check
- The `Checking <index name>` text will update as each index is checked. Text will wrap if necessary
- The results tables begin updating with results
- Pattern stats update to summarize each table
- Rolled up results for the entire page update after every index is checked

![running_before_errors](https://user-images.githubusercontent.com/4459398/215990059-43efd573-217f-47e8-8ed2-1b1de4766834.png)

<https://user-images.githubusercontent.com/4459398/216007795-2ebbc0c6-8c7a-49c7-a22c-b97d2a58dddd.mov>

When Check all, is running, the Data Quality dashboard adds a three second delay after every check completes, before beginning the next check.

Check all will keep checking indexes until the user cancels, or all indexes have (attempted to be) checked.

While Check all is running, users may simultaneously click on any index to check it on demand. The results are instantly rolled up when this happens.

When all checks complete, the page looks like this:

![all_results_no_errors](https://user-images.githubusercontent.com/4459398/215990208-b28e1ad4-d8fd-453b-a037-1123c4352469.png)

### Take action

Click the `Take action` popover to share the entire page of results via one of the following actions:

- Add to new case
- Copy to clipboard

![take_action_popover](https://user-images.githubusercontent.com/4459398/215990971-fff06bf3-cac5-418f-83fc-556caa4b9413.png)

![create_case_from_take_action](https://user-images.githubusercontent.com/4459398/216012412-812f7b84-94a7-462a-8574-2e05afa35efd.gif)

![copy_toast](https://user-images.githubusercontent.com/4459398/215992498-c83b9191-8226-4ab1-8170-1bc953083f5c.png)

### Expanding results

The `Incompatible fields` tab is always displayed by default when a result is expanded

The `Incompatible fields` tab shows a success message when a successful result is expanded

![incompatible_fields_zero](https://user-images.githubusercontent.com/4459398/215991201-2ff7158e-1787-4221-b2de-d7e5ee49c412.png)

The `Incompatible fields` tab shows, side by side, expected ECS mapping types vs the actual mapping types when they are different

![mapping_differences](https://user-images.githubusercontent.com/4459398/215990436-82bb969e-fab7-4f2b-97f1-f21fd5bc3641.png)

The `Incompatible fields` tab also compares field values expected by ECS vs the actual values in an index, when they are different

![expect_vs_actual_value](https://user-images.githubusercontent.com/4459398/215990341-2c5ce75b-03cc-4b72-9431-282dfd032844.png)

The `Incompatible fields` tab displays a callout that explains the consequences of having incompatible fields. The content is based on the following illustration, created by @MikePaquette

<img width="1264" alt="ecs_meter" src="https://user-images.githubusercontent.com/4459398/216016124-6fe89ab4-c364-40ec-8a6f-99349e6d583c.png">

The calllout has a call to action to create a case or copy a markdown report for just the expanded result

- Add to new case
- Copy to clipboard

![create_case_from_incompatable_fields_tab](https://user-images.githubusercontent.com/4459398/215990827-57506e26-06e3-4704-afb4-4bd8308b217a.png)

### Tabs

The Summary tab displays a call to action when incompatible fields are found

Click on any part of the Summary tab chart or legend to navigate to the corresponding tab

![summary_tab](https://user-images.githubusercontent.com/4459398/215990517-41e96cab-558a-4461-a34a-e149873841a4.png)

Clicking on the `Copy to clipboard` call to action in the Custom fields tab copies a markdown version of the table to the clipboard

![custom_fields_tab](https://user-images.githubusercontent.com/4459398/215990623-8c787d11-cf93-4321-a803-2133c81fcd1b.png)

The search feature of the ECS complaint fields tab may, for example, be used to verify a specific ECS complaint mapping exists

![ecs_complaint_fields_tab](https://user-images.githubusercontent.com/4459398/215990703-dc0b93b3-a3ed-447b-96c5-714d71f4177d.png)

The All fields tab displays the union of all other tabs

![all_fields_tab](https://user-images.githubusercontent.com/4459398/215990746-88eb8812-7a00-47f4-94fc-5105aad024c1.png)

### Data view selection

The `Data view` dropdown defaults to the `Security Default Data View`

![data_view_selection](https://user-images.githubusercontent.com/4459398/216020987-d710aa85-5ddc-4fa1-9a3f-c131e656da56.png)

The alerts index is always checked and included in the results, even when another Data View is selected

![alerts_index_always_included](https://user-images.githubusercontent.com/4459398/216022004-4a6adb46-5bc1-4619-ad46-7364d7565e3a.png)

### ILM phase options

![ilm_selection](https://user-images.githubusercontent.com/4459398/216023010-c3bb9e3e-9aec-487b-8757-e4736c06de7e.png)

Only `hot`, `warm`, or `unmanaged` indices may be selected for checking.

The `cold` and `frozen` options are disabled.

When all options in the `ILM phase` box are cleared, an informative empty prompt is displayed

![ilm_empty_prompt](https://user-images.githubusercontent.com/4459398/216029584-659fafda-92fb-4607-b61e-87aa3f0b45e8.png)

### Errors

Errors may occur for some (or all) indices. The `View errors` button appears when the first error occurs

![running_with_errors](https://user-images.githubusercontent.com/4459398/216024230-609ec815-e2e4-408f-b9a5-d12aad9f83c5.png)

Users may click the `View errors` button to view them, even while a check is in progress

![error_popover](https://user-images.githubusercontent.com/4459398/216755446-210996d8-605b-4d6b-8c90-cf94dc83a76b.png)

The Copy to clipboard button  in the errors popover copies a markdown version of the errors table to the clipboard

When errors occur, the same content shown in the Errors popover is automatically included in the markdown report created by the `Take action` menu

### Markdown reports

The content of markdown reports (created by the Take action menu) includes most of the content from the Data Quality dashboard that created it

In the screenshot below, the Data Quality dashboard is on the left, and a markdown report (pasted into Github) is on the right

![side_by_side_compare_1](https://user-images.githubusercontent.com/4459398/216026602-7cf7aaaa-b461-44e0-a03e-6690e3d87d3c.png)

Stats rollups and tables are included in markdown reports

![side_by_side_2](https://user-images.githubusercontent.com/4459398/216026872-d5319279-e4b2-4ac0-b291-06dc61ba108c.png)

Markdown reports use the same "expected vs actual" format to display the details of incompatible field mappings

### Navigation

The Data Quality dashboard is grouped with the existing Security Solution dashboards

![dashboards_page](https://user-images.githubusercontent.com/4459398/216057432-0ae99d57-4857-4270-bd7d-07bc96e27cb0.png)

It may also be launched via the side navigation

![side_nav](https://user-images.githubusercontent.com/4459398/216057528-2370b82a-dc92-4ea6-8519-7e8abc61acd0.png)

## Privileges

The privileges in the table below are required to check any pattern of indices, or any specific index:

| Privilege                                         | Required to                                                                                                                       | Required for API |
|-------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|------------------|
| `monitor` or `manage`  (`manage` builds on `monitor`) | List indices that match a pattern, and get document counts for an index  example: `GET logs-*/_stats`                             | `_stats`         |
| `view_index_metadata` or `manage_ilm`                 | List index ILM configs (e.g. hot) that match a pattern  example: `GET logs-*/_ilm/explain`                                        | `_ilm/explain`   |
| `view_index_metadata` or `manage`                     | Get index mappings for a specific index  example:  `GET .ds-logs-endpoint.events.process-default-2023.01.17-000001/_mapping`      | `_mapping`       |
| `read` or `read_cross_cluster`                        | Run aggregations to test for unallowed values  example:  `GET .ds-logs-endpoint.events.process-default-2023.01.17-000001/_search` | `_search`        |

Users may have some of the privileges required to check an index, but not all of them.

The built-in `viewer` role does not have the `monitor` (or `manage`) role. The following screenshot illustrates what a user will see if they login as a user with the `viewer` role:

![login_with_viewer_role](https://user-images.githubusercontent.com/4459398/216755590-b6c01a7b-73b1-4680-8db1-b9d1c0035f06.png)

# An actual markdown report (all content below)

The rest of the content below is pasted from an actual report, created via the `Take action` menu:

# Data quality

| Incompatible fields | Indices checked | Indices | Docs |
|---------------------|-----------------|---------|------|
| 17 | 15 | 17 | 1,404,514 |

## .alerts-security.alerts-default

`hot(1)`

| Incompatible fields | Indices checked | Indices | Docs |
|---------------------|-----------------|---------|------|
| 1 | 1 | 1 | 1,837 |

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .internal.alerts-security.alerts-default-000001 | 1,837 (100.0%) | 1 | `hot` |

### .internal.alerts-security.alerts-default-000001

The `.internal.alerts-security.alerts-default-000001` index has [mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) or field values that are different than the [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html) (ECS), version `8.6.0` [definitions](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html).

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .internal.alerts-security.alerts-default-000001 | 1,837 (100.0%) | 1 | `hot` |

### **Incompatible fields** `1` **Custom fields** `188` **ECS compliant fields** `1219` **All fields** `1408`

#### 1 incompatible field

Fields are incompatible with ECS when index mappings, or the values of the fields in the index, don't conform to the Elastic Common Schema (ECS), version 8.6.0.

 Detection engine rules referencing these fields may not match them correctly
 Pages may not display some events or fields due to unexpected field mappings or values
 Mappings or field values that don't comply with ECS are not supported

#### Incompatible field values - .internal.alerts-security.alerts-default-000001

| Field | ECS values (expected) | Document values (actual) |
|-------|-----------------------|--------------------------|
| event.category | `authentication`, `configuration`, `database`, `driver`, `email`, `file`, `host`, `iam`, `intrusion_detection`, `malware`, `network`, `package`, `process`, `registry`, `session`, `threat`, `vulnerability`, `web` | `behavior` (62) |

## auditbeat-*

`hot(11)`  `unmanaged(1)`

| Incompatible fields | Indices checked | Indices | Docs |
|---------------------|-----------------|---------|------|
| 13 | 10 | 12 | 29,182 |

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.6.0-2023.01.17-000001 | 14,409 (49.4%) | 0 | `hot` |
| -- | .ds-auditbeat-8.5.3-2023.01.24-000001 | 2,857 (9.8%) | -- | `hot` |
|  | .ds-auditbeat-8.2.3-2023.01.24-000001 | 2,246 (7.7%) | 0 | `hot` |
|  | .ds-auditbeat-8.4.1-2023.01.24-000001 | 2,179 (7.5%) | 0 | `hot` |
| -- | .ds-auditbeat-8.3.3-2023.01.24-000001 | 1,921 (6.6%) | -- | `hot` |
|  | auditbeat-7.16.0-2023.01.17-000001 | 1,880 (6.4%) | 0 | `hot` |
|  | .ds-auditbeat-8.1.1-2023.01.24-000001 | 1,676 (5.7%) | 0 | `hot` |
|  | .ds-auditbeat-8.2.2-2023.01.24-000001 | 1,578 (5.4%) | 0 | `hot` |
|  | .ds-auditbeat-8.0.0-2023.01.24-000001 | 251 (0.9%) | 0 | `hot` |
|  | auditbeat-7.10.2-2023.01.24-000001 | 111 (0.4%) | 12 | `hot` |
|  | .ds-auditbeat-8.5.0-2023.01.24-000001 | 74 (0.3%) | 0 | `hot` |
|  | auditbeat-custom-empty-index-1 | 0 (0.0%) | 1 | `unmanaged` |

### .ds-auditbeat-8.6.0-2023.01.17-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.6.0-2023.01.17-000001 | 14,409 (49.4%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `549` **ECS compliant fields** `1210` **All fields** `1759`

### .ds-auditbeat-8.2.3-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.2.3-2023.01.24-000001 | 2,246 (7.7%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `510` **ECS compliant fields** `1210` **All fields** `1720`

### .ds-auditbeat-8.4.1-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.4.1-2023.01.24-000001 | 2,179 (7.5%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `509` **ECS compliant fields** `1210` **All fields** `1719`

### auditbeat-7.16.0-2023.01.17-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | auditbeat-7.16.0-2023.01.17-000001 | 1,880 (6.4%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `523` **ECS compliant fields** `1111` **All fields** `1634`

### .ds-auditbeat-8.1.1-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.1.1-2023.01.24-000001 | 1,676 (5.7%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `510` **ECS compliant fields** `1204` **All fields** `1714`

### .ds-auditbeat-8.2.2-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.2.2-2023.01.24-000001 | 1,578 (5.4%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `510` **ECS compliant fields** `1210` **All fields** `1720`

### .ds-auditbeat-8.0.0-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.0.0-2023.01.24-000001 | 251 (0.9%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `510` **ECS compliant fields** `1204` **All fields** `1714`

### auditbeat-7.10.2-2023.01.24-000001

The `auditbeat-7.10.2-2023.01.24-000001` index has [mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) or field values that are different than the [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html) (ECS), version `8.6.0` [definitions](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html).

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | auditbeat-7.10.2-2023.01.24-000001 | 111 (0.4%) | 12 | `hot` |

### **Incompatible fields** `12` **Custom fields** `467` **ECS compliant fields** `602` **All fields** `1081`

#### 12 incompatible fields

Fields are incompatible with ECS when index mappings, or the values of the fields in the index, don't conform to the Elastic Common Schema (ECS), version 8.6.0.

 Detection engine rules referencing these fields may not match them correctly
 Pages may not display some events or fields due to unexpected field mappings or values
 Mappings or field values that don't comply with ECS are not supported

#### Incompatible field mappings - auditbeat-7.10.2-2023.01.24-000001

| Field | ECS mapping type (expected) | Index mapping type (actual) |
|-------|-----------------------------|-----------------------------|
| error.message | `match_only_text` | `text` |
| error.stack_trace | `wildcard` | `keyword` |
| http.request.body.content | `wildcard` | `keyword` |
| http.response.body.content | `wildcard` | `keyword` |
| message | `match_only_text` | `text` |
| process.command_line | `wildcard` | `keyword` |
| process.parent.command_line | `wildcard` | `keyword` |
| registry.data.strings | `wildcard` | `keyword` |
| url.full | `wildcard` | `keyword` |
| url.original | `wildcard` | `keyword` |
| url.path | `wildcard` | `keyword` |

#### Incompatible field values - auditbeat-7.10.2-2023.01.24-000001

| Field | ECS values (expected) | Document values (actual) |
|-------|-----------------------|--------------------------|
| event.kind | `alert`, `enrichment`, `event`, `metric`, `state`, `pipeline_error`, `signal` | `error` (1) |

### .ds-auditbeat-8.5.0-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-auditbeat-8.5.0-2023.01.24-000001 | 74 (0.3%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `509` **ECS compliant fields** `1210` **All fields** `1719`

### auditbeat-custom-empty-index-1

The `auditbeat-custom-empty-index-1` index has [mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) or field values that are different than the [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html) (ECS), version `8.6.0` [definitions](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html).

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | auditbeat-custom-empty-index-1 | 0 (0.0%) | 1 | `unmanaged` |

### **Incompatible fields** `1` **Custom fields** `0` **ECS compliant fields** `0` **All fields** `0`

#### 1 incompatible field

Fields are incompatible with ECS when index mappings, or the values of the fields in the index, don't conform to the Elastic Common Schema (ECS), version 8.6.0.

 Detection engine rules referencing these fields may not match them correctly
 Pages may not display some events or fields due to unexpected field mappings or values
 Mappings or field values that don't comply with ECS are not supported

#### Incompatible field mappings - auditbeat-custom-empty-index-1

| Field | ECS mapping type (expected) | Index mapping type (actual) |
|-------|-----------------------------|-----------------------------|
| @timestamp | `date` | `-` |

## logs-*

`hot(2)`

| Incompatible fields | Indices checked | Indices | Docs |
|---------------------|-----------------|---------|------|
| 3 | 2 | 2 | 602 |

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-logs-endpoint.alerts-default-2023.01.17-000001 | 342 (56.8%) | 2 | `hot` |
|  | .ds-logs-endpoint.events.process-default-2023.01.17-000001 | 260 (43.2%) | 1 | `hot` |

### .ds-logs-endpoint.alerts-default-2023.01.17-000001

The `.ds-logs-endpoint.alerts-default-2023.01.17-000001` index has [mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) or field values that are different than the [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html) (ECS), version `8.6.0` [definitions](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html).

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-logs-endpoint.alerts-default-2023.01.17-000001 | 342 (56.8%) | 2 | `hot` |

### **Incompatible fields** `2` **Custom fields** `857` **ECS compliant fields** `675` **All fields** `1534`

#### 2 incompatible fields

Fields are incompatible with ECS when index mappings, or the values of the fields in the index, don't conform to the Elastic Common Schema (ECS), version 8.6.0.

 Detection engine rules referencing these fields may not match them correctly
 Pages may not display some events or fields due to unexpected field mappings or values
 Mappings or field values that don't comply with ECS are not supported

#### Incompatible field mappings - .ds-logs-endpoint.alerts-default-2023.01.17-000001

| Field | ECS mapping type (expected) | Index mapping type (actual) |
|-------|-----------------------------|-----------------------------|
| process.env_vars | `keyword` | `object` |

#### Incompatible field values - .ds-logs-endpoint.alerts-default-2023.01.17-000001

| Field | ECS values (expected) | Document values (actual) |
|-------|-----------------------|--------------------------|
| event.category | `authentication`, `configuration`, `database`, `driver`, `email`, `file`, `host`, `iam`, `intrusion_detection`, `malware`, `network`, `package`, `process`, `registry`, `session`, `threat`, `vulnerability`, `web` | `behavior` (45) |

### .ds-logs-endpoint.events.process-default-2023.01.17-000001

The `.ds-logs-endpoint.events.process-default-2023.01.17-000001` index has [mappings](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) or field values that are different than the [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/ecs-reference.html) (ECS), version `8.6.0` [definitions](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html).

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-logs-endpoint.events.process-default-2023.01.17-000001 | 260 (43.2%) | 1 | `hot` |

### **Incompatible fields** `1` **Custom fields** `130` **ECS compliant fields** `304` **All fields** `435`

#### 1 incompatible field

Fields are incompatible with ECS when index mappings, or the values of the fields in the index, don't conform to the Elastic Common Schema (ECS), version 8.6.0.

 Detection engine rules referencing these fields may not match them correctly
 Pages may not display some events or fields due to unexpected field mappings or values
 Mappings or field values that don't comply with ECS are not supported

#### Incompatible field mappings - .ds-logs-endpoint.events.process-default-2023.01.17-000001

| Field | ECS mapping type (expected) | Index mapping type (actual) |
|-------|-----------------------------|-----------------------------|
| process.env_vars | `keyword` | `object` |

## packetbeat-*

`hot(2)`

| Incompatible fields | Indices checked | Indices | Docs |
|---------------------|-----------------|---------|------|
| 0 | 2 | 2 | 1,372,893 |

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-packetbeat-8.6.0-2023.01.17-000001 | 704,062 (51.3%) | 0 | `hot` |
|  | .ds-packetbeat-8.4.1-2023.01.24-000001 | 668,831 (48.7%) | 0 | `hot` |

### .ds-packetbeat-8.6.0-2023.01.17-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-packetbeat-8.6.0-2023.01.17-000001 | 704,062 (51.3%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `604` **ECS compliant fields** `1209` **All fields** `1813`

### .ds-packetbeat-8.4.1-2023.01.24-000001

| Result | Index | Docs | Incompatible fields | ILM Phase |
|--------|-------|------|---------------------|-----------|
|  | .ds-packetbeat-8.4.1-2023.01.24-000001 | 668,831 (48.7%) | 0 | `hot` |

### **Incompatible fields** `0` **Custom fields** `604` **ECS compliant fields** `1209` **All fields** `1813`

## Errors

Some indices were not checked for Data Quality

Errors may occur when pattern or index metadata is temporarily unavailable, or because you don't have the privileges required for access

The following privileges are required to check an index:
- `monitor` or `manage`
- `view_index_metadata`
- `read` or `read_cross_cluster`


| Pattern | Index | Error | 
|---------|-------|-------|
| .alerts-security.alerts-default | -- | `Error loading stats: Error: Forbidden` |
| auditbeat-* | -- | `Error loading stats: Error: Forbidden` |
| logs-* | -- | `Error loading stats: Error: Forbidden` |
| packetbeat-* | -- | `Error loading stats: Error: Forbidden` |

See also: https://github.com/elastic/security-team/issues/4559
2023-02-06 21:10:43 -07:00
Thomas Watson
575c79ba4a
[docs] Document considerations around major Node.js upgrades (#150155) 2023-02-02 19:59:48 +01:00
Sébastien Loix
24765997bb
[Content management] Setup plugin (#149813) 2023-01-30 08:26:23 -06:00
Kaarina Tungseth
1f9eca02a0
[DOCS] Removes legacy plugins (#149545)
## Summary

Removes the outdated legacy plugin docs from the Kibana Developer Guide.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-01-27 14:47:01 -06:00
Thomas Watson
6a0f7b9562
Downgrade Node.js to version 16 (#149531)
Closes #149438

We'll upgrade again once a suitable solution to the issue has been
found.
2023-01-26 11:53:52 +00:00
Pierre Gayvallet
cd9a53f284
Create the ftrSoApis FTR plugin (#149188)
## Summary

Fix https://github.com/elastic/kibana/issues/148412

More and more SO types will not be accessible from the HTTP APIs (either
`hidden:true` or `hiddenFromHTTPApis: true`).

However, the FTR SO client (`KbnClientSavedObjects`) still needs to be
able to access and manipulate all SO types.

This PR introduces a `ftrSoApis` plugin that is loaded for all FTR
suites. This plugin exposes SO APIs that are used by the FTR client
instead of the public SO HTTP APIs. These APIs are configured to know
about all types, even hidden ones.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-26 01:47:29 -07:00
Christiane (Tina) Heiligers
f7b25f5e46
[Saved Objects] Provide ability to remove SO type from global SO HTTP API without hiding from the client (#149166)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
resolves https://github.com/elastic/kibana/issues/147150
2023-01-23 15:04:24 -07:00
Thomas Watson
b345f75634
Upgrade Node.js from v16.18.1 to v18.13.0 (#144012)
Closes #134930

Breaking changes in Node.js majors:

- `17.0.0`:
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V17.md#17.0.0
- `18.0.0`:
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#18.0.0
2023-01-17 21:04:23 +01:00
Spencer
afb09ccf8a
Transpile packages on demand, validate all TS projects (#146212)
## Dearest Reviewers 👋 

I've been working on this branch with @mistic and @tylersmalley and
we're really confident in these changes. Additionally, this changes code
in nearly every package in the repo so we don't plan to wait for reviews
to get in before merging this. If you'd like to have a concern
addressed, please feel free to leave a review, but assuming that nobody
raises a blocker in the next 24 hours we plan to merge this EOD pacific
tomorrow, 12/22.

We'll be paying close attention to any issues this causes after merging
and work on getting those fixed ASAP. 🚀

---

The operations team is not confident that we'll have the time to achieve
what we originally set out to accomplish by moving to Bazel with the
time and resources we have available. We have also bought ourselves some
headroom with improvements to babel-register, optimizer caching, and
typescript project structure.

In order to make sure we deliver packages as quickly as possible (many
teams really want them), with a usable and familiar developer
experience, this PR removes Bazel for building packages in favor of
using the same JIT transpilation we use for plugins.

Additionally, packages now use `kbn_references` (again, just copying the
dx from plugins to packages).

Because of the complex relationships between packages/plugins and in
order to prepare ourselves for automatic dependency detection tools we
plan to use in the future, this PR also introduces a "TS Project Linter"
which will validate that every tsconfig.json file meets a few
requirements:

1. the chain of base config files extended by each config includes
`tsconfig.base.json` and not `tsconfig.json`
1. the `include` config is used, and not `files`
2. the `exclude` config includes `target/**/*`
3. the `outDir` compiler option is specified as `target/types`
1. none of these compiler options are specified: `declaration`,
`declarationMap`, `emitDeclarationOnly`, `skipLibCheck`, `target`,
`paths`

4. all references to other packages/plugins use their pkg id, ie:
	
	```js
    // valid
    {
      "kbn_references": ["@kbn/core"]
    }
    // not valid
    {
      "kbn_references": [{ "path": "../../../src/core/tsconfig.json" }]
    }
    ```

5. only packages/plugins which are imported somewhere in the ts code are
listed in `kbn_references`

This linter is not only validating all of the tsconfig.json files, but
it also will fix these config files to deal with just about any
violation that can be produced. Just run `node scripts/ts_project_linter
--fix` locally to apply these fixes, or let CI take care of
automatically fixing things and pushing the changes to your PR.

> **Example:** [`64e93e5`
(#146212)](64e93e5806)
When I merged main into my PR it included a change which removed the
`@kbn/core-injected-metadata-browser` package. After resolving the
conflicts I missed a few tsconfig files which included references to the
now removed package. The TS Project Linter identified that these
references were removed from the code and pushed a change to the PR to
remove them from the tsconfig.json files.

## No bazel? Does that mean no packages??
Nope! We're still doing packages but we're pretty sure now that we won't
be using Bazel to accomplish the 'distributed caching' and 'change-based
tasks' portions of the packages project.

This PR actually makes packages much easier to work with and will be
followed up with the bundling benefits described by the original
packages RFC. Then we'll work on documentation and advocacy for using
packages for any and all new code.

We're pretty confident that implementing distributed caching and
change-based tasks will be necessary in the future, but because of
recent improvements in the repo we think we can live without them for
**at least** a year.

## Wait, there are still BUILD.bazel files in the repo
Yes, there are still three webpack bundles which are built by Bazel: the
`@kbn/ui-shared-deps-npm` DLL, `@kbn/ui-shared-deps-src` externals, and
the `@kbn/monaco` workers. These three webpack bundles are still created
during bootstrap and remotely cached using bazel. The next phase of this
project is to figure out how to get the package bundling features
described in the RFC with the current optimizer, and we expect these
bundles to go away then. Until then any package that is used in those
three bundles still needs to have a BUILD.bazel file so that they can be
referenced by the remaining webpack builds.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-22 19:00:29 -06:00
hardikpnsp
af2a7d63f4
[Documentation] Fix links to repository files on Best Practices page (#96152) 2022-12-21 14:16:11 -07:00
Gerard Soldevila
57dad8fc07
Prevent future convertToMultiNamespaceType migrations (#147369)
Addresses https://github.com/elastic/kibana/issues/147344
2022-12-21 18:12:54 +01:00
Karl Godard
0b19cfafa3
Custom fleet policy UX for new integration (cloud defend v1) (#147300)
## Summary

New Kibana plugin created for an integration called "Cloud defend for
containers" which will have a corresponding agent service which can
proactively block and alert on executable creation or modification in a
running container.

This plugin is purely in place to configure the fleet policy UX around
this new integration. For now we have added a yaml editor as a custom
input to our integration. The monaco-yaml libary was added to allow
support for JSON schema validation support for yaml.

Integration PR is up, and a work in progress: (waiting on some content
for the doc page)
https://github.com/elastic/integrations/pull/4680

### Screenshot


![image](https://user-images.githubusercontent.com/16198204/207160791-73e11e05-953b-42ba-b4dd-a4904bd95451.png)

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

Co-authored-by: Karl Godard <karlgodard@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-19 17:37:39 -07:00
Anton Dosov
74ab0759f1
Image Embeddable (#146421)
close https://github.com/elastic/kibana/issues/81345

Adds an image embeddable - a new embeddable type that allows to
insert images into dashboard using the new file service
2022-12-19 14:50:29 +01:00