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

TSVB is retaining results even after indexpattern is removed from options #31951

Closed
bhavyarm opened this issue Feb 25, 2019 · 3 comments
Closed
Labels
bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@bhavyarm
Copy link
Contributor

bhavyarm commented Feb 25, 2019

Kibana version: 6.7.0 BC3

Elasticsearch version: 6.7.0 BC3

Server OS version: darwin_x86_64

Browser version: chrome latest

Browser OS version: OS X

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

Describe the bug: I was playing with TSVB and trying to get a top 10 hit on machine.ram on logstash dataset from loading sample data from Kibana tutorial.
https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html

I couldn't get the value for top hit on ram so I deleted the logstash indexpattern and voila - all of a sudden tsvb is displaying the graph, gauge chart and top n for ram that too for a timeperiod which doesn't make sense on the logstash dataset.

This is very confusing and also its letting the user save the chart like this:

what_tsvb_doing

screen shot 2019-02-25 at 2 52 20 pm

@bhavyarm bhavyarm added bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Feb 25, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@bhavyarm
Copy link
Contributor Author

These are the es logs:

2019-02-25T14:53:40,510][DEBUG][o.e.a.s.TransportSearchAction] [0zMYHJq] [.monitoring-es-6-2019.02.25][0], node[0zMYHJq-SCC4m4h-CSvFQw], [P], s[STARTED], a[id=5mmgokBrT1Ktvw8f8YIlMQ]: Failed to execute [SearchRequest{searchType=QUERY_THEN_FETCH, indices=[.kibana, .kibana_1, .kibana_task_manager, .monitoring-alerts-6, .monitoring-es-6-2019.02.21, .monitoring-es-6-2019.02.22, .monitoring-es-6-2019.02.23, .monitoring-es-6-2019.02.24, .monitoring-es-6-2019.02.25, .monitoring-kibana-6-2019.02.21, .monitoring-kibana-6-2019.02.22, .monitoring-kibana-6-2019.02.23, .monitoring-kibana-6-2019.02.24, .monitoring-kibana-6-2019.02.25, .reporting-2019.02.17, .security, .security-6, .triggered_watches, .watcher-history-9-2019.02.21, .watcher-history-9-2019.02.22, .watcher-history-9-2019.02.23, .watcher-history-9-2019.02.24, .watcher-history-9-2019.02.25, .watches, bank, heartbeat-6.7.0-2019.02.20, kibana_sample_data_ecommerce, kibana_sample_data_flights, kibana_sample_data_logs, logstash-2015.05.18, logstash-2015.05.19, logstash-2015.05.20, map-test, myindex, shakespeare], indicesOptions=IndicesOptions[ignore_unavailable=true, allow_no_indices=true, expand_wildcards_open=true, expand_wildcards_closed=false, allow_aliases_to_multiple_indices=true, forbid_closed_indices=true, ignore_aliases=false, ignore_throttled=true], types=[], routing='null', preference='null', requestCache=null, scroll=null, maxConcurrentShardRequests=5, batchedReduceSize=512, preFilterShardSize=64, allowPartialSearchResults=true, localClusterAlias=null, getOrCreateAbsoluteStartMillis=-1, source={"size":0,"timeout":"30000ms","query":{"bool":{"must":[{"range":{"@timestamp":{"from":1393358020481,"to":1551124420481,"include_lower":true,"include_upper":true,"format":"epoch_millis","boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}},"aggregations":{"61ca57f1-469d-11e7-af02-69e470af7417":{"meta":{"timeField":"@timestamp","intervalString":"604800s","bucketSize":604800},"filter":{"match_all":{"boost":1.0}},"aggregations":{"timeseries":{"date_histogram":{"field":"@timestamp","time_zone":"America/New_York","interval":"604800s","offset":0,"order":{"_key":"asc"},"keyed":false,"min_doc_count":0,"extended_bounds":{"min":1393358020481,"max":1551124420481}},"aggregations":{"61ca57f2-469d-11e7-af02-69e470af7417":{"filter":{"exists":{"field":"machine.ram","boost":1.0}},"aggregations":{"docs":{"top_hits":{"from":0,"size":1,"version":false,"seq_no_primary_term":false,"explain":false,"_source":{"includes":["machine.ram"],"excludes":[]},"sort":[{"@timestamp":{"order":"desc"}}]}}}}}}}}}}}] lastShard [true]
org.elasticsearch.transport.RemoteTransportException: [0zMYHJq][127.0.0.1:9300][indices:data/read/search[phase/query]]
Caused by: org.elasticsearch.index.query.QueryShardException: No mapping found for [@timestamp] in order to sort on
	at org.elasticsearch.search.sort.FieldSortBuilder.build(FieldSortBuilder.java:319) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.sort.SortBuilder.buildSort(SortBuilder.java:153) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.metrics.tophits.TopHitsAggregationBuilder.doBuild(TopHitsAggregationBuilder.java:606) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.metrics.tophits.TopHitsAggregationBuilder.doBuild(TopHitsAggregationBuilder.java:63) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.AbstractAggregationBuilder.build(AbstractAggregationBuilder.java:139) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.AggregatorFactories$Builder.build(AggregatorFactories.java:336) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.AggregatorFactory.<init>(AggregatorFactory.java:187) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.bucket.filter.FilterAggregatorFactory.<init>(FilterAggregatorFactory.java:44) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder.doBuild(FilterAggregationBuilder.java:98) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.AbstractAggregationBuilder.build(AbstractAggregationBuilder.java:139) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.AggregatorFactories$Builder.build(AggregatorFactories.java:336) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.AggregatorFactory.<init>(AggregatorFactory.java:187) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory.<init>(ValuesSourceAggregatorFactory.java:40) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregatorFactory.<init>(DateHistogramAggregatorFactory.java:54) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder.innerBuild(DateHistogramAggregationBuilder.java:442) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder.doBuild(ValuesSourceAggregationBuilder.java:311) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder.doBuild(ValuesSourceAggregationBuilder.java:37) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.AbstractAggregationBuilder.build(AbstractAggregationBuilder.java:139) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.AggregatorFactories$Builder.build(AggregatorFactories.java:336) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.AggregatorFactory.<init>(AggregatorFactory.java:187) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.bucket.filter.FilterAggregatorFactory.<init>(FilterAggregatorFactory.java:44) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder.doBuild(FilterAggregationBuilder.java:98) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.AbstractAggregationBuilder.build(AbstractAggregationBuilder.java:139) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.aggregations.AggregatorFactories$Builder.build(AggregatorFactories.java:336) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.SearchService.parseSource(SearchService.java:811) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.SearchService.createContext(SearchService.java:620) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:595) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:386) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.SearchService.access$100(SearchService.java:125) ~[elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:358) [elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:354) [elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1085) [elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41) [elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:751) [elasticsearch-6.7.0.jar:6.7.0]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.7.0.jar:6.7.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) [?:?]
	at java.lang.Thread.run(Thread.java:844) [?:?]

@alexwizp
Copy link
Contributor

Interesting issue. I think it'a a regression issue after #24832 and #30946
Not sure that we should set the empty string as a default value for index_pattern during creating a new TSVB. In case of '' it's very difficult to understand is it a user value or we should replace it to default index pattern.

@timroes @markov00 Please review the PR below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

3 participants