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

[Metrics UI] The URL generated by the Metrics Explorer is not reusable #73175

Closed
hendry-lim opened this issue Jul 24, 2020 · 3 comments · Fixed by #74311
Closed

[Metrics UI] The URL generated by the Metrics Explorer is not reusable #73175

hendry-lim opened this issue Jul 24, 2020 · 3 comments · Fixed by #74311
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 triage_needed

Comments

@hendry-lim
Copy link

Kibana version: 7.9.0-SNAPHSOT

Elasticsearch version: 7.9.0-SNAPSHOT

Browser version: Firefox 78.0.2

Original install method (e.g. download page, yum, from source, etc.): Docker

Describe the bug:
The URL generated by the Metrics Explorer is not reusable.

Use case: I would like to include a link to the Metrics Explorer in the alert message to automatically select the metrics, grouping, filter, and time range filter.

Steps to reproduce:

  1. In Kibana, go to Metrics --> Metrics Explorer
  2. Choose to plot Average of system.memory.actual.used.pct (any metric)
  3. Graph per: host.name
  4. Filter: host.name:"hostname" (any host name)
  5. Set the start time filter to a specific time in the past
  6. Copy and paste the URL to another browser tab, observe that all fields reverted to default

Expected behavior:
All selected metrics, filters, grouping, and time filter should be the same as those selected in the steps above.

Any additional context:
Sample URL:
http://localhost:5601/app/metrics/explorer?metricsExplorer=(chartOptions:(stack:!f,type:line,yAxisMode:fromZero),options:(aggregation:avg,filterQuery:%27host.name:%22alpine07%22%27,groupBy:!(host.name),metrics:!((aggregation:avg,color:color0,field:system.memory.actual.used.pct)),source:default),timerange:(from:%272020-07-23T23:00:00.000Z%27,interval:%3E%3D10s,to:now))&waffleFilter=(expression:%27%27,kind:kuery)&waffleOptions=(accountId:%27%27,autoBounds:!t,boundsOverride:(max:1,min:0),customMetrics:!(),customOptions:!(),groupBy:!(),legend:(palette:cool,reverseColors:!f,steps:10),metric:(type:cpu),nodeType:host,region:%27%27,sort:(by:name,direction:desc),source:default,view:map)&waffleTime=(currentTime:1595550410191,isAutoReloading:!f)

@myasonik myasonik 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 triage_needed labels Jul 27, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@hendry-lim
Copy link
Author

hendry-lim commented Jul 27, 2020

This works fine in 7.8.1, but not in 7.9.0-SNAPSHOT.

Comparing the URL generated in 7.8.1

/app/metrics/explorer?metricsExplorer=(chartOptions:(stack:!f,type:line,yAxisMode:fromZero),options:(aggregation:avg,filterQuery:%27%27,groupBy:host.name,metrics:!((aggregation:avg,color:color0,field:system.cpu.total.norm.pct))),timerange:(from:now-1h,interval:%3E%3D10s,to:now))

and 7.9.0-SNAPSHOT

/app/metrics/explorer?metricsExplorer=(chartOptions:(stack:!f,type:line,yAxisMode:fromZero),options:(aggregation:avg,filterQuery:%27%27,groupBy:!(host.name),metrics:!((aggregation:avg,color:color0,field:system.memory.actual.used.pct)),source:default),timerange:(from:%272020-07-23T23:00:00.000Z%27,interval:%3E%3D10s,to:now))

noticed 2 differences:

  1. 7.8.1 --> groupBy:host.name and 7.9.0-SNAPSHOT --> groupBy:!(host.name)
  2. 7.8.1 --> no source param and 7.9.0-SNAPSHOT --> source:default

The metric, filters, and grouping are preserved, if the URL in 7.9.0-SNAPSHOT is changed based on the following:

  • groupBy:!(host.name) --> groupBy:host.name
  • source:default --> source:url

/app/metrics/explorer?metricsExplorer=(chartOptions:(stack:!f,type:line,yAxisMode:fromZero),options:(aggregation:avg,filterQuery:%27%27,groupBy:host.name,metrics:!((aggregation:avg,color:color0,field:system.cpu.total.norm.pct)),source:url),timerange:(from:now-1h,interval:%3E%3D10s,to:now))

@simianhacker
Copy link
Member

Thanks @hendry-lim for filing this.

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 triage_needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants