I just wanna see how Kibana queries elasticsearch to learn how a little more on how it works internally to make all the cool charts and stuff. Timelion too.
is there a way to display that? Or maybe I can make elasticsearch log all the queries it gets or something. I never did any of that before so any ideas welcome!
There are a few different options, depending on what you want to inspect.
Kibana makes queries to Elasticsearch from both the frontend and the backend. The frontend queries can be viewed directly in the network tab of your browser's devtools.
Visualizations include a "spy tab" that allows you to see what the raw query looked like. Here's an example:
Backend requests were trickier until the (just released) version 5.2 came out. In 5.2 you can add elasticsearch.logQueries: true to your kibana.yml config file and then start up kibana with --verbose. This will log all of the backend queries to your console, including Timelion queries.
Another option, which I haven't personally tried but I know others have had some success with, is to set Elasticsearch's slowlog thereshold to 0 so that all queries to ES are logged. This is obviously something you'd only want to do in development, but could be a useful catchall.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.