Timelion error when data doesn't exist

Hi
I am using Timelion to display the transaction trend comparison between Today, Day -1 and Day-5.

Below is my query

(.es(q="_type:ussd AND service:USERECHARGECARD",metric="avg:response_time").fit(carry).label("Day"),.es(q="_type:ussd AND service:USERECHARGECARD",metric="avg:response_time",offset=-1d).fit(carry).label("Day-1"),.es(q="_type:ussd AND service:USERECHARGECARD",metric="avg:response_time",offset=-5d).fit(carry).label("Day-5")).title("Voucher Topup Avg Latency")

However the data (index) for Day-5 doesn't exist and hence facing the following issues:
1- "Error Timelion: Error: in cell #1: Cannot read property '1' of undefined" with the stacktrace as below

Error:  in cell #1: Cannot read property '1' of undefined
    at throwWithCell (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/src/core_plugins/timelion/server/handlers/chain_runner.js:30:11)
    at /elkapp/elk/app/kibana-5.0.0-linux-x86_64/src/core_plugins/timelion/server/handlers/chain_runner.js:192:11
    at bound (domain.js:280:14)
    at runBound (domain.js:293:12)
    at tryCatcher (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/promise.js:503:31)
    at Promise._settlePromiseAt (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/promise.js:577:18)
    at Promise._settlePromises (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/promise.js:693:14)
    at Async._drainQueue (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)
    at processImmediate [as _immediateCallback] (timers.js:582:5)

Another query for Day-5 is working fine. The only difference is I am using metric and hence seems failing.

Pls advice if there is any error in syntax and Timelion should not throw error even if there is no data.

Looks like you found a bug @mvenkat_in

I filed https://github.com/elastic/kibana/issues/9053 and fixed it in https://github.com/elastic/kibana/pull/9054. Hopefully we can get those merged soon and released with 5.1.0

1 Like

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