Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solutions] (Phase 1) Adds an application cache called metrics entities and integrates it within Security Solutions behind a feature flag #96446

Merged

Conversation

FrankHassanabad
Copy link
Contributor

@FrankHassanabad FrankHassanabad commented Apr 7, 2021

Summary

Phase 1 of a multi-phase cautious approach for adding an experimental application cache for Kibana solutions called metric_entities and integrates it within Security Solutions.

Phase 1 is putting experimental support into the application without breaking existing features. Lots of TODO's, conversations and a possible RFC from phase 1 to phase 2 approach. Some features are missing, but for phase 1 the general idea and code is all there.

To enable this first phase after checking out the branch add this to your kibana.dev.yml

xpack.metricsEntities.enabled: true
xpack.securitySolution.enableExperimental: ['metricsEntitiesEnabled']

Then go into Stack Management -> Advanced Settings (Under Security Solutions) and set the enabled to true like so:
Screen Shot 2021-04-08 at 2 21 02 PM

Next go to the security_solutions page and you will see it being activated and you will have these transforms running if you look under stack management:
Screen Shot 2021-04-29 at 2 00 27 PM

On the hosts page, network, page, etc... You can see them being activated when you have no query/filter and you click on request:
Screen Shot 2021-04-29 at 2 01 28 PM

You will see in the request the index patterns all starting with estc_xyz*

Checklist

Delete any items that are not applicable to this PR.

We have lots of TODO's but no concrete docs with this just yet.

  • Documentation was added for features that require explanation or tutorials

Behind a feature flag and this isn't there yet.

@FrankHassanabad FrankHassanabad self-assigned this Apr 7, 2021
@FrankHassanabad FrankHassanabad changed the title Add summary metrics plugin Adds an application cache for Kibana solutions called metrics entities and integrates it with Security Solutions. Apr 7, 2021
@FrankHassanabad FrankHassanabad changed the title Adds an application cache for Kibana solutions called metrics entities and integrates it with Security Solutions. Adds an application cache for Kibana solutions called metrics entities and integrates it with Security Solutions Apr 12, 2021
@FrankHassanabad FrankHassanabad marked this pull request as ready for review April 29, 2021 19:46
@FrankHassanabad FrankHassanabad requested review from a team as code owners April 29, 2021 19:46
@FrankHassanabad FrankHassanabad changed the title Adds an application cache for Kibana solutions called metrics entities and integrates it with Security Solutions [Security Solutions] Adds an application cache called metrics entities and integrates it within Security Solutions Apr 29, 2021
@FrankHassanabad FrankHassanabad added the Team:Detections and Resp Security Detection Response Team label Apr 29, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@FrankHassanabad FrankHassanabad added release_note:feature Makes this part of the condensed release notes v8.0.0 v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Apr 29, 2021
@FrankHassanabad FrankHassanabad changed the title [Security Solutions] Adds an application cache called metrics entities and integrates it within Security Solutions [Security Solutions] [Phase 1] Adds an application cache called metrics entities and integrates it within Security Solutions behind a feature flag Apr 29, 2021
@FrankHassanabad FrankHassanabad changed the title [Security Solutions] [Phase 1] Adds an application cache called metrics entities and integrates it within Security Solutions behind a feature flag [Security Solutions] (Phase 1) Adds an application cache called metrics entities and integrates it within Security Solutions behind a feature flag Apr 29, 2021
Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_server_watch_paths LGTM

Comment on lines +46 to +47
Restart Kibana and ensure that you are using `--no-base-path` as changing the base path is a feature but will
get in the way of the CURL scripts written as is.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Platform discourages --no-base-path. We should adapt our scripts to play nice when without this flag. We've discussed this previously with some options being leveraging a static server.basePath: '/kbn', or wrapping our scripts in a helper that calls curl -L http://localhost:5601/ and looks at the redirect and then uses that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tip

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 2013 2029 +16

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
metricsEntities - 5 +5

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 6.5MB 6.6MB +32.3KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
metricsEntities - 1 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 160.0KB 160.8KB +849.0B
Unknown metric groups

API count

id before after diff
metricsEntities - 8 +8

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @FrankHassanabad

Copy link
Member

@spong spong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked out, tested locally, and pair code-reviewed with @FrankHassanabad. Thank you for all your efforts here, and for taking the time to go over all these changes with me -- this is giant leap in providing fast and snappy UI's via metrics and entities! LGTM! 👍 🙂 🚀

@FrankHassanabad FrankHassanabad merged commit af228f0 into elastic:master Apr 30, 2021
@FrankHassanabad FrankHassanabad deleted the add-summary-metrics-plugin branch April 30, 2021 18:36
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 30, 2021
…cs entities and integrates it within Security Solutions behind a feature flag (elastic#96446)

## Summary

Phase 1 of a multi-phase cautious approach for adding an experimental application cache for Kibana solutions called `metric_entities` and integrates it within Security Solutions.

Phase 1 is putting experimental support into the application without breaking existing features. Lots of TODO's, conversations and a possible RFC from phase 1 to phase 2 approach. Some features are missing, but for phase 1 the general idea and code is all there.

To enable this first phase after checking out the branch add this to your `kibana.dev.yml`

```yml
xpack.metricsEntities.enabled: true
xpack.securitySolution.enableExperimental: ['metricsEntitiesEnabled']
```

Then go into Stack Management -> Advanced Settings (Under Security Solutions) and set the enabled to true like so:
<img width="1229" alt="Screen Shot 2021-04-08 at 2 21 02 PM" src="https://user-images.githubusercontent.com/1151048/114091276-b3cbb700-9875-11eb-9083-5c1d91dd20ed.png">

Next go to the security_solutions page and you will see it being activated and you will have these transforms running if you look under stack management:
<img width="1710" alt="Screen Shot 2021-04-29 at 2 00 27 PM" src="https://user-images.githubusercontent.com/1151048/116611174-4a2e4e00-a8f3-11eb-9e15-55cb504dfb2a.png">

On the hosts page, network, page, etc... You can see them being activated when you have no query/filter and you click on request:
<img width="1405" alt="Screen Shot 2021-04-29 at 2 01 28 PM" src="https://user-images.githubusercontent.com/1151048/116611274-6a5e0d00-a8f3-11eb-9998-9f5b3d1c5c63.png">

You will see in the request the index patterns all starting with `estc_xyz*`

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

We have lots of TODO's but no concrete docs with this just yet.
- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials

Behind a feature flag and this isn't there yet.
- [ ] [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
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Apr 30, 2021
…cs entities and integrates it within Security Solutions behind a feature flag (#96446) (#98967)

## Summary

Phase 1 of a multi-phase cautious approach for adding an experimental application cache for Kibana solutions called `metric_entities` and integrates it within Security Solutions.

Phase 1 is putting experimental support into the application without breaking existing features. Lots of TODO's, conversations and a possible RFC from phase 1 to phase 2 approach. Some features are missing, but for phase 1 the general idea and code is all there.

To enable this first phase after checking out the branch add this to your `kibana.dev.yml`

```yml
xpack.metricsEntities.enabled: true
xpack.securitySolution.enableExperimental: ['metricsEntitiesEnabled']
```

Then go into Stack Management -> Advanced Settings (Under Security Solutions) and set the enabled to true like so:
<img width="1229" alt="Screen Shot 2021-04-08 at 2 21 02 PM" src="https://user-images.githubusercontent.com/1151048/114091276-b3cbb700-9875-11eb-9083-5c1d91dd20ed.png">

Next go to the security_solutions page and you will see it being activated and you will have these transforms running if you look under stack management:
<img width="1710" alt="Screen Shot 2021-04-29 at 2 00 27 PM" src="https://user-images.githubusercontent.com/1151048/116611174-4a2e4e00-a8f3-11eb-9e15-55cb504dfb2a.png">

On the hosts page, network, page, etc... You can see them being activated when you have no query/filter and you click on request:
<img width="1405" alt="Screen Shot 2021-04-29 at 2 01 28 PM" src="https://user-images.githubusercontent.com/1151048/116611274-6a5e0d00-a8f3-11eb-9998-9f5b3d1c5c63.png">

You will see in the request the index patterns all starting with `estc_xyz*`

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

We have lots of TODO's but no concrete docs with this just yet.
- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials

Behind a feature flag and this isn't there yet.
- [ ] [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: Frank Hassanabad <frank.hassanabad@elastic.co>
@FrankHassanabad FrankHassanabad added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:feature Makes this part of the condensed release notes labels Jul 22, 2021
FrankHassanabad added a commit that referenced this pull request Apr 11, 2022
## Summary

Removes the `metrics_entities` plugin and POC. As a different direction will be taken and people can look back at the git history for it as they see fit if they need to refer to it. Once it's re-added it it will be through an RFC process and re-discussed.

Earlier PR's which added the POC:

#96446
#104559

### Checklist

- [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Detections and Resp Security Detection Response Team v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants