Commit graph

30338 commits

Author SHA1 Message Date
cachedout
54d40e3670
[Stack Monitoring] Prefer units if they are defined when rende… (#43709)
* Prefer units if they are defined when rendering cells

* Jest snapshot update

* Lint recommendations

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-28 18:28:45 +00:00
Frank Hassanabad
5108eb378d
[SIEM][Detection Engine] critical blocker bug fixes ancestor mapping
## Summary

* Fixes critical bug with ancestor mapping being object and not correct mappings.

Testing you should now be able to do operations and it will show up on KQL
<img width="1111" alt="Screen Shot 2020-01-28 at 9 33 59 AM" src="https://user-images.githubusercontent.com/1151048/73284943-86d03e80-41b2-11ea-93a4-0d648169d223.png">

<img width="1116" alt="Screen Shot 2020-01-28 at 9 33 22 AM" src="https://user-images.githubusercontent.com/1151048/73285062-b0896580-41b2-11ea-8dfd-6dafa7f28fa9.png">


### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~

~~- [ ] 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/master/packages/kbn-i18n/README.md)~~

~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~

~~- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~~

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~

~~- [ ] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
2020-01-28 11:14:28 -07:00
Joe Portner
04049609f8
Add lockfile symlinks check for correct path (#56043)
Scanning tools may not be able to follow symlinks of symlinks. This
adds an additional check to make sure the lockfile symlink points
directly to the project root's lockfile.
2020-01-28 13:01:24 -05:00
Matthias Wilhelm
b9d18c4930 Skip 'context view for date_nanos with custom timestamp' functional test (#56178) 2020-01-28 09:53:21 -08:00
Tim Sullivan
f0fbb99088
[Reporting/NP] Migration of Reporting Security dependency (#56046)
* first pass at new security integration

* fix tests

* cosmetic

* specialize security parameter for get user factory
2020-01-28 10:47:28 -07:00
Ben Skelker
0b1d308e3a
fixes map index message (#56104) 2020-01-28 19:36:39 +02:00
Melissa Alvarez
b34db43057
[ML] Add functional tests for analytics UI: creation addition and regression/outlier results (#56059)
* add description input functional test to analytics creation test

* regression results functional tests - add initial tests

* outlier results functional tests - add initial test

* ensure description is saved correctly

* fix no key react warning
2020-01-28 12:19:04 -05:00
Brian Seeders
708713496d
Skip flaky visualize_security test 2020-01-28 12:13:56 -05:00
Chris Roberson
04ad88cd77
[Monitoring] Change all configs to monitoring.* (#54919)
* Initial config renaming - not working

* Tweak config key names and move to core_deprecations

* Remove new ones from this PR

* Fix mocha tests

* Update more configs

* Update config in test

* Add note to move these

* Missed one

* Fix mocha tests

* Fix tests
2020-01-28 11:38:35 -05:00
Frank Hassanabad
a157513cfa
[SIEM][Detection Engine] critical blocker updates to latest ECS version
## Summary

* Updates to the latest ECS version right before us shipping as expected by taking it from:
https://raw.githubusercontent.com/elastic/ecs/master/generated/elasticsearch/7/template.json



Testing:
* Ensure I remembered to put `"dynamic": false`
* Do a ./hard_reset.sh
* Test run a few things to make sure everything still works as expected.

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~

~~- [ ] 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/master/packages/kbn-i18n/README.md)~~

~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~

~~- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~~

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~

~~- [ ] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
2020-01-28 09:32:16 -07:00
Chris Roberson
30dbdf7350
[Monitoring] Fix inaccuracies in logstash pipeline listing metrics (#55868)
* Change how we fetch pipeline listing metrics to match what other charts show

* Fix tests

* Fix tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-28 11:29:16 -05:00
igoristic
9685eca401
Resetting errors and removing duplicates (#56054) 2020-01-28 11:25:04 -05:00
Joe Reuter
8c2980213e
Add flag to opt out from sub url tracking (#55672)
* introduce flag for disabling sub url tracking

* re-generate documentation and extend ui_app

* fix ui_nav_link test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-28 16:51:07 +01:00
Frank Hassanabad
24a6eb2cde
[SIEM][Detection Engine] critical bug, fixes duplicate tags
## Summary

You can get duplicate tags that keep growing with each update which is not good at all and will cause major data issues for customers.

<img width="467" alt="Screen Shot 2020-01-27 at 10 22 23 PM" src="https://user-images.githubusercontent.com/1151048/73242235-9d01de80-4161-11ea-9c5d-56cafc865dd5.png">

Testing:

Create a rule, then update it

```sh
./post_rule.sh
./update_rule.sh
```

Grab the id of the rule and run the `get_saved_objects.sh` like so:

```sh
./get_saved_objects.sh alert ${id}
```

You shouldn't have duplicates in tags, it should look like this:

```sh
    "tags": [
      "__internal_rule_id:query-rule-id",
      "__internal_immutable:false"
    ],
```


### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~

~~- [ ] 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/master/packages/kbn-i18n/README.md)~~

~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~

- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~

- [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2020-01-28 08:49:49 -07:00
Walter Rafelsberger
106ddf918c
[ML] Anomaly Detection: Fix persist/restore of refreshInterval in globalState. (#56113)
Fixes persist/restore of the date picker's refreshInterval in globalState.
2020-01-28 16:26:36 +01:00
Walter Rafelsberger
5ecd34afda
[ML] Single Metric Viewer: Fix annnotations refresh. (#56107)
When creating/editing/deleting an annotation, the Single Metric Viewer page wouldn't update with the applied changes. This fixes it by tracking the change in the outer component with lastRefresh/previousRefresh and making it a condition in contextChartSelected() to trigger an update after a refresh.
2020-01-28 16:07:31 +01:00
Pierre Gayvallet
a1ccb29731
adapt ObjectToConfigAdapter.getFlattenedPaths to consider arrays as final values (#56105)
* adapt getFlattenedPaths to consider arrays as final values

* add getUnusedConfigKeys test

* improve tests
2020-01-28 16:04:43 +01:00
Josh Dover
7d2074a95a
Add Appender.receiveAllLevels option to fix LegacyAppender (#55752) 2020-01-28 07:34:27 -07:00
David Roberts
9fcbeb3dd8
[ML] Process delimited files like semi-structured text (#56038)
Changes the file upload functionality to process delimited
files by splitting them into to messages, then sending
these to the ingest pipeline as a single field for further
processing in Elasticsearch.

The csv_importer has been removed and the old sst_importer
replaced with a similar message_importer that has been
enhanced to cover the edge cases required by delimited
file processing.

Previously the file upload functionality parsed CSV in the
browser, but by parsing CSV in the ingest pipeline it
makes the Kibana file upload functionality more easily
interchangable with Filebeat such that the configurations
it creates can more easily be used to import data with the
same structure repeatedly in production.

Companion to elastic/elasticsearch#51492
2020-01-28 14:16:50 +00:00
Nick Partridge
05ed2d63b5
Charts plugin (combining ui/color_maps and EuiUtils) (#55469)
* Combine ui/color_maps and EuiUtils into new Charts plugin
* EuiUtils is now the theme service
* ui/color_maps is now the colorMaps service
* Fix all imports of each to pull from new Charts plugin
* Add theme methods to both setup and start contracts
* Move and jestify heatMapColors tests
* Convert remaining js files to ts
* Move vis/color to Charts plugin
* Update missed visTypeVislib naming
2020-01-28 08:13:56 -06:00
Joe Reuter
22117abf49
fix tutorial documentation (#55996) 2020-01-28 15:02:04 +01:00
Walter Rafelsberger
e237c9cf33
[ML] Fix persist/restore of time/refreshInterval in data visualizer. (#56122)
Fixes persist/restore of time/refreshInterval in data visualizer.
2020-01-28 14:52:24 +01:00
Alison Goryachev
b7eef03a34
[Index Management] Fix errors with validation (#56072) 2020-01-28 08:33:18 -05:00
Alison Goryachev
92a106220a
[Index Management] Add try/catch when parsing index filter from URI (#56051) 2020-01-28 08:23:48 -05:00
Mikhail Shustov
a831710c6d
[NP] add HTTP resources testing strategies (#54908)
* add HTTP resources testing strategies

* address comments

* add error message test and update error test

* Apply suggestions from code review

Co-Authored-By: Rudolf Meijering <skaapgif@gmail.com>

* add controller testing example

Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
2020-01-28 14:21:43 +01:00
Walter Rafelsberger
885f315623
[ML] Single Metric Viewer: Fix brush update on short recent timespans. (#56125)
Fixes an issue where the context chart brush would render incorrectly for short recent time spans (e.g. 'now-15min`). Adds a check whether to display the brush and hide it if context and focus chart have the same timespan.
2020-01-28 13:56:39 +01:00
Justin Kambic
a2a0f118d6
[Uptime] Add timeout for slow process to skipped functional tests (#56065)
* Reorder assertions in functional tests.

* Introduce retry to functional tests.
2020-01-28 05:50:30 -07:00
MadameSheema
5e9db02e92
refactor (#56121) 2020-01-28 13:19:40 +01:00
Daniil Suleiman
4d43639f0e
Move tests in dashboard into appropriate folders (#55304)
* Move tests in dashboard into appropriate folders

* Remove unused imports
2020-01-28 13:43:27 +03:00
MadameSheema
24ac6d2931
[SIEM] Inspect readable (#56110)
* extracts methods to tasks

* uses cypress api for assertions

* refactor

* Inspect refactor

* fixes rebase issue
2020-01-28 11:32:36 +01:00
James Gowdy
ecc8240dcb
[ML] Reseting categorization validation if category field is cleared (#56029) 2020-01-28 09:44:59 +00:00
MadameSheema
fc10fb6b4f
[SIEM] Fields browser readable (#56000)
* extracts methods to tasks

* uses cypress api for assertions

* refactor

* removes tag
2020-01-28 10:04:41 +01:00
Brandon Morelli
3db8cb34b0
[docs] Remove unused callout (#56032) 2020-01-27 21:03:06 -08:00
Matthias Wilhelm
1504e830ac
Refactor saved object management registry usage (#54155)
* Migrate registry to TypeScript

* Migrate management code

* Migrate SavedObjectLoader services registration to management section

* Replace Angular SavedSearchLoader in transform plugin

* Migrate saved_visualizations from visualize to visualizations plugin
2020-01-28 05:36:12 +01:00
Frank Hassanabad
4f65985979
[SIEM][Detection Engine] critical blocker, updates the pre-packaged rules, removes dead ones, adds license file (#56090)
## Summary

* Adds updated pre-packaged rules with more meta-data (from randomuserid)
* Deletes older rules not shipping (from randomuserid)
* Adds license file for rules (from randomuserid)

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11]~~(https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)
~~- [ ] 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/master/packages/kbn-i18n/README.md)~~
~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~
~~- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~~
~~- [ ] This was checked for [keyboard-only and screenreader accessibility]~~(https://developer.mozilla.org/enUS/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

- [x] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
- [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2020-01-27 20:26:01 -07:00
Brian Seeders
e792292923
Fix failing snapshot artifact tests when using env var (#56063) 2020-01-27 21:44:58 -05:00
Brian Seeders
ba151fea0b
Fix Github PR comment formatting (#56078) 2020-01-27 20:45:24 -05:00
Nathan Reese
1488aa9eaf
[Maps] fix join metric field selection bugs (#56044)
* lint fixes

* move aggregation check to MEtricEditor

* fix functional test, handle case where fields are not loaded
2020-01-27 20:13:21 -05:00
Phillip Burch
1ec7ee79b6
Create a new menu for observability links (#54847)
* Create a new menu for observability links. Use it on inentory page.

* Change the order of props for clarity

* Fix default message

* Composition over configuration

* Show ids and ips. PR feedback.

* Don't wrap subtitle. Use fields in inventory model for name

* Tooltip was becoming hacky. Keep it simple and wrap the id.

* Create observability plugin. Add action menu to it.

* Fix path

* Satisfy linter and fix test

* Please the linter

* Update translastions

* Update test for disabled links

* Update more tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-27 19:10:34 -06:00
Garrett Spong
80087a399f
[SIEM] [Detection Engine] Fixes histogram intervals (#55969)
## Summary

This PR wraps up the remaining `Detection Engine` meta tickets: https://github.com/elastic/kibana/issues/55585, https://github.com/elastic/kibana/issues/54935, and https://github.com/elastic/siem-team/issues/498
- [x] Histogram bar interval (bar counts and widths) consistency (https://github.com/elastic/kibana/issues/55585)
  - [x] Make the bar intervals a consistent 32 bars across the board
  * Enabled `extended_bounds`, `min_doc_count: 0`, and now setting consistent `fixed_interval` when querying to ensure the entire daterange is displayed across all histograms.
- [x] Filter out the "untitled" timelines from both timeline selection options during rule creation (https://github.com/elastic/siem-team/issues/498)
  - [ ] ~Import query from saved timeline~
    * For 7.7 tracking ticket here: https://github.com/elastic/kibana/issues/56079
  - [x] `Investigate detections using this timeline template` 
- [x] Everywhere we use "Alerts" (Overview page, Host Tab, Network Tab) we should change the term to "External Alerts"
  - [x] Updated Host Page Tab/Table/Histogram/Breadcrumbs
  - [x] Updated Network Page Tab/Table/Histogram/Breadcrumbs
- [x] Updated DE permission/index  error doc links to go to [corresponding DE docs section](https://www.elastic.co/guide/en/siem/guide/7.6/detection-engine-overview.html#detections-permissions)
- [x] Removed `frequency` in favor of `count` for remaining histograms

##### Inconsistent Histogram intervals
![image](https://user-images.githubusercontent.com/2946766/73161560-04a82300-40a9-11ea-950f-ea56f9a5bfd7.png)


##### Consistent Histogram Intervals
![image](https://user-images.githubusercontent.com/2946766/73159564-fefc0e80-40a3-11ea-9b9d-4d15899dabd2.png)


cc @MichaelMarcialis @cwurm @MikePaquette 

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

- [ ] ~This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~
- [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/master/packages/kbn-i18n/README.md)
- [ ] ~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~
- [ ] ~[Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~
- [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~

### For maintainers

- [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
- [ ] ~This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
2020-01-27 16:44:58 -07:00
Spencer
d66489df37
make test less flaky by retrying if list is re-rendered (#55949)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-27 16:27:36 -07:00
Brian Seeders
99f224097c
Remove matrix build support (#54202) 2020-01-27 17:10:34 -05:00
Nathan L Smith
551e4dc472
Add animation to service map layout (#56042)
We had previously deleted the animation because the method we were using for adding nodes to the map would wipe the whole map out before redrawing it and make for very awkward animation.

The way it works now is the Cytoscape component calls `add` on the cytoscape instance when new elements are added, so the animation looks ok.

Fixes #54796.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-27 15:31:09 -06:00
Poff Poffenberger
be9d9c2ffe
[Canvas] Remove Angular and unnecessary reporting config from Canvas (#54050)
* Remove Angular from Canvas

* Remove reporting config behavior from Canvas since it's no longer needed

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-27 15:01:26 -06:00
Andrew Cholakian
35603c8832
[Uptime] Simplify snapshot max to Infinity (#55931)
Fixes https://github.com/elastic/uptime/issues/119

Rather than relying on a contant for the max number of monitors, it's
easier to just use infinity. This is simpler than making the iterator
more complex with an 'infinite' mode.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-27 14:42:56 -06:00
Justin Kambic
1df019021f
[Uptime] Reintroduce a column for url (#55451)
* Reintroduce a column for url.

* Reintroduce original URL column.

* Update busted test snapshots.

* Truncate long URLs.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-27 13:07:39 -07:00
Mike Côté
8fe39aef9d
Cleanup action task params objects after successful execution (#55227)
* Cleanup action task params saved objects after use

* Fix jest tests

* Add integration test to ensure object gets cleaned up

* Add unit tests

* Fix comment

* Re-use updated_at instead of creating createdAt

* Consider null/undefined returned from executor as success as well

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-27 15:02:44 -05:00
Brian Seeders
4df1c4c9c1
[CI] Retry flaky tests (#53961) 2020-01-27 14:46:05 -05:00
Alexey Antonov
5d6dbf07b0
Expose NP FieldFormats service to server side (#55419)
* Expose NP FieldFormats service to server side

* fix CI

* fix PR comments

* fix PR comments

* fix CI

* getFieldFormatsRegistry -> getFieldFormatRegistry

* fix CI

* memoize - add resolve cache function

* fix Jest

* move IFieldFormatMetaParams to types.ts

* FieldFormatRegistry -> FieldFormatsRegistry

* update src/core/MIGRATION.md

* update public contract

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-27 22:25:39 +03:00
nnamdifrankie
9301531249
[Endpoint] EMT-65: make endpoint data types common, restructure (#54772)
[Endpoint] EMT-65: make endpoint data types common, use schema changes
2020-01-27 14:23:56 -05:00