TSVB Descending Order not working as expected

Hello,

For some reason when I create 7.3.2 tsvb timeseries chart and select order by "Max of system.diksio.read.bytes", the legend is not sorted at all:

Json export of the visualisation:

{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"},"title":"Elastic Beats Metricbeat System DiskIO Read Bytes Windows Disk Name Time Series","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"Elastic Beats Metricbeat System DiskIO Read Bytes Windows Disk Name Time Series\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"timeseries\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"terms\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"max\",\"field\":\"system.diskio.read.bytes\"},{\"unit\":\"\",\"id\":\"b4c50a50-dec0-11e9-8645-256c9a1c014d\",\"type\":\"derivative\",\"field\":\"61ca57f2-469d-11e7-af02-69e470af7417\"},{\"unit\":\"\",\"id\":\"ee8a5100-dec0-11e9-8645-256c9a1c014d\",\"type\":\"positive_only\",\"field\":\"b4c50a50-dec0-11e9-8645-256c9a1c014d\"}],\"separate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"bytes\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":\"0.2\",\"stacked\":\"none\",\"label\":\"\",\"terms_field\":\"system.diskio.name\",\"terms_order_by\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"terms_size\":\"10\",\"terms_direction\":\"desc\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"metricbeat\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"axis_scale\":\"normal\",\"show_legend\":1,\"show_grid\":1,\"default_index_pattern\":\"metricbeat\",\"default_timefield\":\"@timestamp\",\"filter\":{\"query\":\"event.dataset : \\\"system.diskio\\\" AND host.os.family : \\\"windows\\\"\",\"language\":\"kuery\"}},\"aggs\":[]}"},"id":"d1982970-dec3-11e9-8536-f91cecc85017","migrationVersion":{"visualization":"7.3.1"},"references":[],"type":"visualization","updated_at":"2019-09-24T12:07:02.791Z","version":"WzU1MDUsMV0="}~

I'm guessing the reason is that system.diskio.read.bytes is a incrementing counter or sth like that? Is there some way to make the sort work on the derivative instead of on the raw value?

Another issue I noted with this visualisation is that sometimes it looke like this:


This seems to happen mostly on small time ranges. Is there any way to prevent this?

Tx

Willem

Hi @willemdh
can you please an issue here for the first problem (legend ordering)?https://github.com/elastic/kibana/issues/new?template=Bug_report.md
Seems like a legit bug but It's better to track it down first.

Instead for the second issue, can you please describe a bit what is the desired output instead? Because it really depends on the nature of your data.

Hi Marco,

@markov00 Thanks for the fast answer. See https://github.com/elastic/kibana/issues/46466. For the second issue, I'll try to explain with 2 visualisations:

  1. Last 30 minutes range:

  1. Same visualisation, last 15 minutes range:

Metrics are gathered every 10 seconds, so there is definitely data. Visualizing the same data in Grafana works perfectly..

Grtz

Willem

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.