Timelion not working at all: "Timelion request error: in cell #1: No such function: es"

Hello everyone,
We have just finished building up our ELK stack from the latest pieces of this puzzle (8.6.0): elasticsearch+kibana+filebeat+metricbeat. We are trying to build some timelion visualizations from metricbeat data, and when trying to create a new visualization, we get an error "[timelion_vis] > Timelion request error: in cell #1: No such function: es". No usable info from kibana log, and dev console neither (dev console response is the same, as the error message: {"statusCode":400,"error":"Bad Request","message":" in cell #1: No such function: es"}). Any ideas, what is going on? Thank you in advance for any tips.

This is weird, what query are you trying to run on timelion? Does it happen with the default? es(*)
If you run something more specific i.e. select the index .es(index=metrics-*)? Does it still fail?
And from curiosity, why dont you use Lens instead?

Yep, it is weird :slight_smile: It happens just after clicking on Create Visualization=>Aggregation based=>Timelion. Way before defining any queries. And no, nothing changes even if we replace the default query with a more specific one. As for the "why" question: we had an older ELK instance (8.2.3), but certain circumstances forced us to build up a new one. We had some Timelion visualizations there with queries that were a bit complicated to visualize in Lens, that's why.

Hello again,
It seems we have found the culprit. As the error message said "No such function: es", we looked into the server side code, what it does. This error message is generated in plugin.js, line 37, so it seemed the problem comes from function loading. When we compared the contents of the timelion plugin folders between 8.2.3 and 8.6.0 (/src/plugins/vis_types/timelion) we indeed found a difference in the file server/lib/load_functions.js, where the line var _glob = _interopRequireDefault(require("glob")); in 8.2.3 has been replaced with var _globby = _interopRequireDefault(require("globby")); in 8.6.0. When we reverted this change, everything went back to normal, timelion started to work properly (after kibana restart of course).
I'd say this is a bug in the timelion server side code.

I see, interesting find, I can't replicate it on my kibana instances though.

We are running kibana on Windows Server 2012R2, if it is of any help.

Got the same issue though, downloaded kibana 8.6.1 on windows, running in powershell CLI. Nothing to see in the logfiles. I did what @matej.szabo said to do, changed the globby to glob (not the variable though) and it works like a charm

1 Like

Ok so it seems that is not supported in windows machines. Thanx for the find folks!

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