Commit graph

13300 commits

Author SHA1 Message Date
Jean-Louis Leysens 4a8ad1c3c1
[Reporting] Removed any from public (#110993)
* removed anys and ran TS organize imports

* updated jest snapshots

* fix import paths for non-type imports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-07 17:47:52 +02:00
Vadim Kibana 95b88cc2fe
add descriptions to plugin manifests (#111306) 2021-09-07 17:24:02 +02:00
Vadim Kibana 5e5dd07470
remove anys in drilldowns plugin (#111305) 2021-09-07 17:23:47 +02:00
Vadim Kibana 05d9bc53fb
Remove any in ui_actions_enhanced (#110018) 2021-09-07 17:23:30 +02:00
Angela Chuang 1adeb7290c
[Security Solution] styling for reason popover (#111338)
* add panelClassName

* remove unused data-test-subj
2021-09-07 10:25:51 -04:00
Kevin Qualters 3a354b5790
Add a loading spinner to alerts page (#111310) 2021-09-07 10:16:21 -04:00
Christiane (Tina) Heiligers b1a81bb5e0
Remove unused legacy import code (#111071)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-07 07:01:35 -07:00
Josh Dover 285d232601
Add dev_docs for Fleet data model (#109476) 2021-09-07 15:45:31 +02:00
Ester Martí Vilaseca d7b9389d67
[Stack Monitoring] Update overview page data on refresh interval (#111354)
* Add onRefresh callback to update page data

* Sync url params with datepicker and global state
2021-09-07 15:35:06 +02:00
Josh Dover 099a63ea2a
[Fleet] Add icons to Integrations global search results (#111131) 2021-09-07 08:27:10 -04:00
Milton Hultgren 51fd4abe20
[Logs UI] Improve log threshold rule field selection (#111135)
* [Logs UI] Use ComboBox for criterion field selection (#110996 
* [Logs UI] Make log threshold criterion field clearable
2021-09-07 14:21:18 +02:00
Søren Louv-Jansen 2cda9a9302
[APM] Deprecate apm_oss.indexPattern config option (#111133)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-07 13:26:52 +02:00
Felix Stürmer 744a424ca2
[RAC] Remove delete phase from default RAC ILM policy (#111139)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-07 13:11:02 +02:00
Felix Stürmer 2e31899bde
[RAC] [Observability] Disable RAC feature flags for now (#111296) 2021-09-07 13:07:16 +02:00
Patryk Kopyciński f18bc68d70
[RAC] Fix missing case title and tags after adding visualization (#111236)
Co-authored-by: Patryk Kopyciński <patryk.kopycinski@elastic.co>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
2021-09-07 13:35:47 +03:00
Josh Dover 7b97b5c443
[Fleet] Stop loading js-yaml in main plugin bundle (#111169) 2021-09-07 10:40:14 +01:00
Pablo Machado 3f015e110b
Fix inconsistent total count on TopN events panel (#111256)
We can't display `response.totalCount` because it is the total number of
events the query returns. It doesn't take into account the aggregation.
It does include events with missing `stackedByField` and events that are
not included in the 10 top.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-07 11:03:11 +02:00
Miriam 9b41b3feae
[APM] Fix loading message missing or inconsistent in various list views (#110772)
* [APM] Fix loading message missing or inconsistent in various list views

* fix types and i18n

* fix comment

* PR review comments

* fix JVM loading message
2021-09-07 08:35:21 +01:00
Dmitry Tomashevich 9f950781a8
[Graph] clear legacy docs (#111083)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-07 10:34:19 +03:00
Alexey Antonov e2c6a039f6
lens should register expression functions in setup contract (#110639)
* lens should register expression functions in setup contract

Closes: #106510

* fix CI

* build optimization

* build optimizations - step 3

* fix CI

* try to optimize bundle

* Update x-pack/plugins/lens/common/expressions/time_scale/types.ts

Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>

* Update types.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>
2021-09-07 10:32:30 +03:00
István Zoltán Szabó 07f49853cd
[APM] Uses doc link service instead of ElasticDocsLink for linking custom links (#111149) 2021-09-07 08:33:42 +02:00
Michael Olorunnisola 5bc6239630
[Security Solution] Timeline uses existing filter manager (#111143)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-06 22:53:58 -04:00
Pete Harverson 1fb09c7d48
[ML] Fixes REST API docs for results service routes (#111298)
* [ML] Fixes REST API docs for results service routes

* [ML] Edits following review

* [ML] Fixed error in modules REST API doc route
2021-09-06 20:31:33 +01:00
István Zoltán Szabó 705fe22088
[APM] Uses doc link service instead of ElasticDocsLink for linking dropped transaction spans (#110964) 2021-09-06 17:15:00 +02:00
Cauê Marcondes b97afb2c72
[APM] Missing transaction type error when creating Latency threshold Alert (#110336)
* redirect to page adding transaction type

* skipping transaction type

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-06 11:09:38 -04:00
Kevin Logan d9c5fa25cc
[Security Solution] Add Windows kernel advanced policy options for 7.15 (#111182) 2021-09-06 10:37:44 -04:00
Kevin Logan d7e14ff72c
[Security Solution] Update protection names in Policy config (#111202) 2021-09-06 10:37:19 -04:00
István Zoltán Szabó 4eefa8531c
[APM] Uses doc link service instead of ElasticDocsLink for linking upgrading info (#111155) 2021-09-06 14:52:46 +02:00
Marco Liberati 1a88d34ea2
[Lens] Reverse colors should not reverse palette picker previews (#110455)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-06 14:27:53 +02:00
Ashokaditya 2e2b451162
[Security Solution][Endpoint] Trim Activity Log comments (#111163)
* trim comments so empty comments do not show up

fixes elastic/kibana/issues/111106

* not exclusive test

* update test to be more specific

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-06 14:15:53 +02:00
Jean-Louis Leysens 02a6eeb69f
[Canvas/Reporting] Migrate Canvas to V2 reporting (#109860)
* first iteration of canvas reporting using v2 PDF generator

* updated jest test

* made v2 report URLs compatible with spaces and simplified some code

* remove non-existent import

* updated import of lib

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-06 13:44:47 +02:00
István Zoltán Szabó 00fac96d37
[APM] Uses doc link service instead of ElasticDocsLink for linking metadata (#110992) 2021-09-06 12:20:35 +02:00
Gloria Hornero 6f31422d9f
adds missing field when creating the email connector (#111251) 2021-09-06 11:38:53 +02:00
Yaroslav Kuznietsov eef094bafb
[Canvas] TagCloud (#106858)
* Added `tagCloud` to canvas.

* Added `icon` to the `tagCloud` element.

* Added column name support at `tag_cloud`.

* Added condition to `vis_dimension` not to pass invalid index.

Added check of accessor index, if such column exists at vis_dimension.
Removed checks of column existance from TagCloudChart.
Added test for accessing data by column name in addition to a column number.
Updated tag_cloud element in Canvas.
Fixed types. Removed almost all `any` and `as` types.

* Added test suites for `vis_dimension` function.

* Added tests for DatatableColumn accessors at tag_cloud_fn and to_ast.

* Refactored metrics, tagcloud and tests.

Added valid functional tests to metrics and tag_cloud.
Fixed types of metrics_vis.
Added handling of empty data at tag_cloud renderer.

* Added storybook ( still doesn't work ).

* Fixed some mistakes.

* Added working storybook with mocks.

* Added clear storybook for tag_cloud_vis_renderer.

* Updated the location of vis_dimension test after movement of the function.

* Fixed unused type.

* Fixed tests and added handling of the column name at `visualizations/**/*/prepare_log_table.ts`

* Reduced the complexity of checking the accessor at `tag_cloud_chart.tsx`

* Added comments at unclear places of code.

* Added the logic for disabling elements for renderers from disabled plugins.

* removed garbage from `kibana.yml`.

* Fixed element_strings.test error.

* Made changes, based on nits.

* Fixed mistake.

* Removed `disabled` flag for `expression_*` plugins.

* recovered lost comments at the unclear places.

* removed dead code.

* fixed test errors.

* Fixed test error, I hope.

* fixed more tests.

* fixed code, based on nits.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-06 04:13:38 -04:00
Patryk Kopyciński 4416a31aa7
[Osquery] Fix support for disabled security (#110547) 2021-09-06 10:10:04 +03:00
Søren Louv-Jansen 61e533f253
[APM] Clean up readme (#110973)
* [APM] Clean up readme

* Update linting.md

* Update testing.md

* Update testing.md

* Update testing.md

* Update plugin-list.asciidoc

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-05 07:14:06 +02:00
Dmitry Shevchenko c6aa4f625c
Fix exceptions page table pagination (#111000) 2021-09-03 21:38:45 +02:00
Justin Kambic 9b20c80867
Fix ML alert not allowed in Uptime app. (#111180) 2021-09-03 15:17:06 -04:00
Quynh Nguyen 167b876a8a
[ML] Fix issue with AD data points not showing up because missing indices (#110899)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 13:12:48 -04:00
Tim Roes df22a8e197
Change Graph ownership (#111157) 2021-09-03 19:12:42 +02:00
Michael Dokolin df43d253c8
[Expressions] Align renderMode with the embeddable viewMode (#110199)
* Add preview view mode to the embeddable
* Rename display render mode to view
* Extract no interactivity render mode to a separate flag
2021-09-03 19:10:29 +02:00
Jonathan Buttner a2c848e1d2
[Cases] Fix connector information disappearing (#110914)
* Move intialization to use effect

* Fixing fields can't get test working

* Fix tests

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
2021-09-03 12:00:51 -04:00
Nick Partridge 634ce7f83b
[ML] fix heatmap label colors (#110515) (#111140) 2021-09-03 11:57:36 -04:00
Marta Bondyra d4c03eb9b4
[Lens] Switch to SavedObjectClient.resolve (#110059)
* Step 2: Update client code to use resolve() method instead of get()

Following sharing Saved Objects developer guide: Step 2
This step demonstrates the changes to update client code to use the new
SavedObjectsClient `resolve()` method instead of `get()`.

* Step 3 Lens
2021-09-03 16:44:12 +02:00
Frank Hassanabad 9a459806ad
[Security Solutions][Detection Engine] Adds ability to ignore fields during alert indexing and a workaround for an EQL bug (#110927)
## Summary

Adds a workaround for EQL bug: https://github.com/elastic/elasticsearch/issues/77152
Adds the safety feature mentioned here: https://github.com/elastic/kibana/issues/110802

Adds the ability to ignore particular [fields](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#search-fields-param) when the field is merged with [_source](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#source-filtering). Also fixes an EQL bug where EQL is introducing the meta field of `_ignored` within the fields and causing documents to not be indexable when we merge with the fields from EQL. 

Alerting document creation uses the fields API to get [runtime field](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html),  [constant keyword](https://www.elastic.co/guide/en/elasticsearch/reference/master/keyword.html#constant-keyword-field-type), etc... that are only available within the [fields API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#search-fields-param) and then merges the field values not found within the `_source` document with the `_source` document and then finally indexes this merged document as an alert document.

This fix/ability is a "safety feature" in that if a problematic [runtime field](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html), [constant keyword](https://www.elastic.co/guide/en/elasticsearch/reference/master/keyword.html#constant-keyword-field-type) is discovered or another bug along the stack we can set a `kibana.yml` key/value pair to ignore the problematic field.

This _WILL NOT_ remove problematic fields from the `_source` document. This will only ignore problematic constant keyword, runtime fields, aliases, or anything else found in the fields API that is causing merge issues.

This PR:
  * Adds a `alertIgnoreFields` `kibana.yml` array key with a default of an empty array if not specified. 
  * Plumbs the `alertIgnoreFields` through the stack and into the fields/_source merge strategies of `missingFields` and `allFields`
  * Adds a temporary `isEqlBug77152` where it hard codes an ignore of `_ignored` until the EQL problem is fixed and then we will remove the workaround
  * Adds unit tests
  * Adds e2e tests which covers the described use cases above.

The `alertIgnoreFields` key/value within `kibana.yml` if set should be an array of strings of each field you want to ignore. This can also contain regular expressions as long as they are of the form, `"/regex/"` in the array.

Example if you want to ignore fields that are problematic called "host.name" and then one in which you want to ignore all fields that start with "user." using a regular expression:

```yml
xpack.securitySolution.alertIgnoreFields: ['host.name', '/user\..*/']
``` 

Although there are e2e tests which exercise the use cases...

If you want to manual test the EQL bug fix you would add these documents in dev tools:

```json
# Delete and add a mapping with a small ignore_above.
DELETE eql-issue-ignore-fields-delme
PUT eql-issue-ignore-fields-delme
{
  "mappings" : {
    "dynamic": "strict",
    "properties" : {
      "@timestamp": {
        "type": "date"
      },
      "some_keyword" : {
        "ignore_above": 5, 
        "type" : "keyword"
      },
      "other_keyword" : {
        "ignore_above": 10, 
        "type" : "keyword"
      }
    }
  }
}

# Add a single document with one field that will be truncated and a second that will not.
PUT eql-issue-ignore-fields-delme/_doc/1
{
  "@timestamp": "2021-09-02T04:13:05.626Z",
  "some_keyword": "longer than normal",
  "other_keyword": "normal"
}
```

Then create an alert which queries everything from it:
<img width="1155" alt="Screen Shot 2021-09-01 at 10 15 06 PM" src="https://user-images.githubusercontent.com/1151048/131781042-faa424cf-65a5-4ebb-b801-3f188940c81d.png">

and ensure signals are created:
<img width="2214" alt="Screen Shot 2021-09-01 at 10 30 18 PM" src="https://user-images.githubusercontent.com/1151048/131782069-b9ab959c-f22d-44d5-baf0-561fe349c037.png">

To test the manual exclusions of any other problematic fields, create any index which has runtime fields or `constant keywords` but does not have anything within the `_source` document using dev tools. For example you can use `constant keyword` like so

```json
PUT constant-keywords-deleme
{
  "mappings": {
    "dynamic": "strict",
    "properties": {
      "@timestamp": {
        "type": "date"
      },
      "testing_ignored": {
        "properties": {
          "constant": {
            "type": "constant_keyword",
            "value": "constant_value"
          }
        }
      },
      "testing_regex": {
        "type": "constant_keyword",
        "value": "constant_value"
      },
      "normal_constant": {
        "type": "constant_keyword",
        "value": "constant_value"
      },
      "small_field": {
        "type": "keyword",
        "ignore_above": 10
      }
    }
  }
}

PUT constant-keywords-deleme/_doc/1
{
  "@timestamp": "2021-09-02T04:20:01.760Z"
}
```

Set in your `kibana.yml` the key/value of:

```yml
xpack.securitySolution.alertIgnoreFields: ['testing_ignored.constant', '/.*_regex/']
```

Setup a rule to run:
<img width="1083" alt="Screen Shot 2021-09-01 at 10 23 23 PM" src="https://user-images.githubusercontent.com/1151048/131781696-fea0d421-836f-465c-9be6-5289fbb622a4.png">

Once it runs you should notice that the constant values for testing are not on the signals table since it only typically exists in the fields API:
<img width="1166" alt="Screen Shot 2021-09-01 at 10 26 16 PM" src="https://user-images.githubusercontent.com/1151048/131781782-1684fb1d-bed9-4cf0-be9a-0abe1f0f34d1.png">

But the normal one still exists:
<img width="1136" alt="Screen Shot 2021-09-01 at 10 26 31 PM" src="https://user-images.githubusercontent.com/1151048/131781827-5450c693-de9e-4285-b082-9f7a2cbd5d07.png">

If you change the `xpack.securitySolution.alertIgnoreFields` by removing it and re-generate the signals you will see these values added back.

### 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
- [x] 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/master/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
2021-09-03 08:41:28 -06:00
Dmitry Shevchenko 19260d5f02
Fix "Expression produces a union type that is too complex to represent" TS error (#111111) 2021-09-03 10:38:58 -04:00
James Gowdy a18cc31924
[ML] Datafeed preview based job validation check (#109080)
* [ML] Datafeed preview based job validation check

* updating warning text

* fix tests

* adding jest test

* updating tests

* fixing translation ids

* fixing more tests

* changes based on review

* disabled validation step next button when validation fails

* disabling nano job test

* adding test skip comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 15:36:03 +01:00
Christiane (Tina) Heiligers 66cb058fa7
Removes support for legacy exports (#110738)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 07:22:14 -07:00
Josh Dover ed18699e38
Handle bulkGet errors on package retrieval from ES storage (#111114) 2021-09-03 16:01:28 +02:00
Marco Liberati 21b4752dba
[Lens] Fix transition to custom palette inconsistency when in number mode (#110852)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 15:57:57 +02:00