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

[Infra UI] Make metrics explorer have a better initial experience #39552

Closed
jasonrhodes opened this issue Jun 25, 2019 · 6 comments
Closed

[Infra UI] Make metrics explorer have a better initial experience #39552

jasonrhodes opened this issue Jun 25, 2019 · 6 comments
Assignees
Labels
Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.3.0

Comments

@jasonrhodes
Copy link
Member

jasonrhodes commented Jun 25, 2019

Right now the initial experience of the metrics explorer forces you to choose a metric before you can see any charts, and you have to choose that metric from a dropdown filled with mostly irrelevant metric selections. In other words, it's fairly painful to get to the first graph(s).

The best solution may be to limit the available metrics in the dropdown to only ones that we think are relevant for producing graph results, e.g. similar to something like the work done (and being discussed) in #36843. But while we wait for that more perfect solution, we should try to find something that makes this experience slightly better for 7.3 if possible.

@tbragin had an idea to default to the "Document Count" instead of "Average", so that users with metricbeat data will immediately see a graph showing them that the explorer is working.

UPDATE: Based on conversation below and elsewhere, we are going to go with a solution where we choose a metric we expect to be there in most cases, look to see if it exists in a subset of recent documents, and if not, fall back to the current behavior.

AC:

  • Default view for the metrics explorer queries for a small set of recent documents and searches the documents for 1 or more hard-coded fields, the first one that exists will be the default metric to display a graph for rather than forcing the user to choose a metric.
  • If no documents are found or the field(s) we are looking for don't exist, we fall back to the current behavior where the user must choose a metric.

Note: To start, let's just search recent documents for system.load.1 first, and then look for whatever you think is the most common docker metric if we don't find system.load.1. We can extend from there once it's working.

@jasonrhodes jasonrhodes added Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.3.0 labels Jun 25, 2019
@jasonrhodes jasonrhodes self-assigned this Jun 25, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-logs-ui

@roncohen
Copy link
Contributor

roncohen commented Jun 25, 2019

I agree this is a problem. Showing "Document count" hides the metrics dropdown and it's not clear to users they must select a new statistics method in order to pick a metric.

Instead I suggest we have a shortlist of hardcoded default metrics (system.cpu..., docker.cpu..., etc.) and query for documents that include those and pick one to graph by default. If no documents with fields from the short list are found, we pick a random recent document and pick a metric from it and then graph that.

@tbragin
Copy link
Contributor

tbragin commented Jun 25, 2019

+1 on exploring this direction, Ron.

@skh
Copy link
Contributor

skh commented Jun 27, 2019

I've opened a draft PR here: #39787

This adds a set of default metrics to the Metrics Explorer in order to improve the initial experience of the UI.

These are the same metrics we use on the inventory page for CPU Usage of hosts, pods and containers, which is selected when you first view the page, so we already make the assumption that these metrics are present if the respective node types are present.

Please have a look and comment.

The solution is so much simpler than what @roncohen proposed that it is trivial to implement. It might not cover all use cases (I would guess it does cover something like 98% but I don't have the data to back that up), so I can continue to work on a more clever heuristic.

@roncohen
Copy link
Contributor

roncohen commented Jun 27, 2019

that certainly is simple. Ideally, we'd avoid showing metrics in the metrics-selector if users don't have them (similar to the problem of the dropdown). They might not be using kubernetes or docker for example. But I like how simple this is from a code perspective.

@skh
Copy link
Contributor

skh commented Jun 27, 2019

@roncohen Agreed, finding out which metrics are present is definitely one of the next steps, and it will help us in all areas of the Infra UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.3.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants