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

[Dataset quality] Introduce Dataset health page #169759

Closed
5 tasks done
yngrdyn opened this issue Oct 25, 2023 · 2 comments
Closed
5 tasks done

[Dataset quality] Introduce Dataset health page #169759

yngrdyn opened this issue Oct 25, 2023 · 2 comments
Assignees
Labels
Feature:Dataset Health Team:obs-ux-logs Observability Logs User Experience Team

Comments

@yngrdyn
Copy link
Contributor

yngrdyn commented Oct 25, 2023

📓 Summary

In order to make ongoing maintenance of log collection easy we want to introduce the concept of dataset health, where users can easily get an overview on the datasets they have with information such as integration, size, last activity, among others.

A hint on the datasources have been laid out in this comment.

image

With tooltips:
image

✔️ Acceptance criteria

  • The datasets management page shows a table of the datasets owned by the installed integrations as well as all uncategorized datasets.
  • The table of datasets has the columns
    • "Name", which is...
      derived from the human-readable name if the dataset is owned by an integration
      derived from the plain dataset name otherwise
      ℹ️ is derived from the plain dataset name
    • "Integration", which is...
      derived from the icon and name of the integration and empty If no integration is found (uncategorized)
    • "Size", which is...
      derived the data stream stats API if a backing data stream exists and 0 otherwise formatted for easy human consumption
    • "Last activity", which is...
      derived from the data stream stats API
  • Table columns are sortable and the initial sorting parameter is Name.
  • The table of the datasets has pagination
  • The dataset management page has an "Add data" link to the on-boarding page in the top right.
  • Dataset management page is hidden by default, no reference is added to the side nav or Explorer.

💡 Implementation hints

  • In the meantime the dataset management should live in observability. Consider creating an architecture such as log-explorer vs observability-logs-explorer where the dataset management page could be extracted in the future from observability smoothly.
  • To create the new plugin we can follow kibana documentation.

Tasks

Preview Give feedback
  1. Team:Fleet Team:obs-ux-logs backport:skip release_note:skip v8.12.0
    yngrdyn
  2. Team:obs-ux-logs backport:skip release_note:skip v8.12.0
    mohamedhamed-ahmed
  3. Team:obs-ux-logs backport:skip release_note:skip v8.12.0
    yngrdyn
  4. Team:obs-ux-logs backport:skip release_note:skip v8.12.0
    yngrdyn
  5. Team:obs-ux-logs backport:skip release_note:skip v8.12.0
    mohamedhamed-ahmed
@yngrdyn yngrdyn added Team:obs-ux-logs Observability Logs User Experience Team Feature:Dataset Health Feature:Logs UI Logs UI feature labels Oct 25, 2023
@yngrdyn yngrdyn changed the title [Dataset management] Introduce Dataset management page [Dataset health] Introduce Dataset management page Oct 25, 2023
@ruflin ruflin changed the title [Dataset health] Introduce Dataset management page [Dataset health] Introduce Dataset health page Oct 25, 2023
@yngrdyn
Copy link
Contributor Author

yngrdyn commented Oct 26, 2023

@weltenwort, @tonyghiani, @Kerry350, @mohamedhamed-ahmed in favour of abstracting, or at least creating a black box component at the beginning, I was thinking on maybe creating a plugin just for the dataset health (sort of what you have between log_explorer and observability_log_explorer).

What do you think about then creating a page, sort of a wrapper, in observability_log_explorer where you can instantiate the dataset health component? would that even be possible? The idea is for this page to live under observability as far as I understand from the breadcrumbs in the mockup

image

@tonyghiani
Copy link
Contributor

In favour of abstracting, or at least creating a black box component at the beginning, I was thinking on maybe creating a plugin just for the dataset health (sort of what you have between log_explorer and observability_log_explorer).

I agree it has its pros to abstract into a new plugin.
Particularly, the main benefit I see is having a reusable page that can be embedded in different apps, as we thought for the Log Explorer to be a reusable one that different apps can consume (apm, fleet, etc.)

What do you think about then creating a page, sort of a wrapper, in observability_log_explorer where you can instantiate the dataset health component? would that even be possible? The idea is for this page to live under observability as far as I understand from the breadcrumbs in the mockup

In my understanding, we want to treat the dataset health page as we do for the log explorer, creating a new client route that embeds the previously created component.

flowchart TD

apm(Apm)
fleet(Fleet)
log_explorer(Log Explorer)
dataset_health(Dataset Health)
observability_log_explorer(Observability Log Explorer)

observability_log_explorer --> log_explorer
observability_log_explorer --> dataset_health
apm --> log_explorer
fleet --> log_explorer
fleet --> dataset_health
Loading

@yngrdyn yngrdyn removed the Feature:Logs UI Logs UI feature label Oct 30, 2023
@yngrdyn yngrdyn changed the title [Dataset health] Introduce Dataset health page [Dataset quality] Introduce Dataset health page Nov 9, 2023
mohamedhamed-ahmed added a commit that referenced this issue Nov 10, 2023
Related to #169759.

## Summary

This PR creates the initial plugin for Dataset Quality.
The plugin has the basic boilerplate that allows us to continue working
on the UI and Server sides in parallel.

Further configs are to be added along with upcoming commits like:
1. Storybook 
2. FTR configs

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
yngrdyn added a commit that referenced this issue Nov 16, 2023
Related to #169759.

## Summary
The Data streams stats endpoint can be queried like so (example with all
parameters):

`GET
/internal/dataset_quality/data_streams/stats?type=logs&sortOrder=asc&datasetQuery=nginx`

### Notes/questions
Our intial idea was to place this endpoint within fleet, after some
discussions we decided to place the endpoint inside our plugin
`dataset_quality`.

- ~~Is `/epm` still the best place to include this new api?~~
    We decided to place the new endpoint in `dataset_quality` plugin.
- ~~Should we include an `uncategorisedOnly` option as part of the Data
Streams Stats endpoint as we do for [Data streams
endpoint](https://github.com/elastic/kibana/blob/c1681c8d49304f324895acbe73323ffacad3fcbc/x-pack/plugins/fleet/server/types/rest_spec/epm.ts#L62)?
We are not planning to have the a filter for this but it could favor
consistency in this area.~~
uncategorizedOnly is not part of the new endpoint although it's easily
extensible to include such parameter.
- ~~We are modifying
`x-pack/plugins/fleet/server/services/epm/data_streams/get.ts` to
include a property for extendedResults, as of now this method only
returns a list of objects that include only the name. We would like to
extend this method to include also information related to the `package`.
Is this the right approach? should we create a new method just for doing
this? Also, this is the method we are using for `GET
/api/fleet/epm/data_streams` since this new property
(`extendedResponse`) is false by default the api is not being directly
affected, but should we include this new param as part of the api
params?~~
We are not working with fleet api anymore, instead we are using an
internal route.
- ~~How does `GetEpmDataStreamsStatsResponse` looks like? is this
reponse type aligned with fleet responses?~~
- ~~We have configured `fleetAuthz: READ_PACKAGE_INFO_AUTHZ` for this
new endpoint, would it be possible to not have this restriction and use
the internal user when querying elastic search?~~

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
davismcphee pushed a commit to davismcphee/kibana that referenced this issue Nov 23, 2023
…observability log explorer (elastic#171777)

Related to elastic#169759.

## Summary

This PR adds the Dataset Quality page behind the path below:
`/app/observability-log-explorer/dataset-quality`

## Testing

1. Navigate to the URL above
2. The table should be displayed with all dataset listed
3. `Add Button` should navigate you to the onboarding page
4. Sorting and Pagination should work as expected

<img width="2552" alt="Screenshot 2023-11-23 at 14 05 44"
src="https://github.com/elastic/kibana/assets/11225826/d348bb10-b2f5-49bf-a4af-dfbc82784bbd">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@yngrdyn yngrdyn closed this as completed Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dataset Health Team:obs-ux-logs Observability Logs User Experience Team
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants