My company has been using Elasticsearch and Kibana for years. We are currently running version 8.8.2, but need to upgrade due to CVEs in that version. I've been tasked to upgrade to 8.12.1.
In our product, we embed Kibana dashboards and the Kibana discover page in our Administrative Tools GUI. We don't allow our customer access to other Kibana functions in our GUI.
Since at least Kibana 5.x, we've been able to embed dashboards and the Discover page using a URL like this:
We get this very abbreviated display (with no bar chart) on Firefox, Chrome, and MS Edge.
I discovered that if I took out the "&embed=true" parameter, then the Discover screen appears normal again. However, we get the Elastic help bar and the Kibana main menu, which we do not want.
I would suggest to check styles of your iframe. Based on the first screenshot, it does not have enough height especially for the chart to render fully.
But I have not changed anything in my Java or JavaScript code at all, except to upgrade the Elasticsearch and Kibana versions.
And if this was a style issue, why does the screen display correctly when I click on the Fullscreen icon? If I click on it again the display is incorrect again.
I checked the javascript code and I only see the size of the margins being set, not the size of the window.
It seems like the top bar chart showing the number of occurrences for each minute can no longer be embedded.
I found more information on embedding dashboards at How to embed Kibana dashboards | Elastic Blog. I will try using some of those parameters, specifically the "height" parameter when I can get ES 8.12.1 loaded up again. Maybe it is required now.
I tried setting the length of the iframe where the Discover screen appears, but the Discover screen ignored it and the display was still incorrect and way too short. It still briefly displays correctly before showing the thin window that is not usable.
I found the global setting doc_table:legacy and set that to true, and my embedded Discover screen immediately started working. So the new Discover screen does not work when it is embedded. I can understand why this wasn't tested because the Discover screen doesn't have a Share -> Embed menu option like the dashboards do. But we've been embedding dashboards and the Discover screen the same way for five or six years and the new Discover screen does not display when embedded.
Since the legacy version is embed-able and the new version functions correctly in that you can browse data, but can't embed and display that data, I still say that this is a bug.
And this Advanced Setting cannot be configured via my kibana.yml file. Is this forum post from 2016 still true? It doesn't seem to work for me, possibly because the API has been deprecated.
The new Discover page cannot be embedded due to a bug that makes the screen too short to be usable.
If you set the Kibana Advanced Setting for " Document Explorer or classic view" to true then you can embed the "classic" Explorer page. In 8.8.2 and earlier versions, this defaulted to true, but in 8.12.x the default is false.
Add the code below to your kibana.yml file to set the default to the classic view:
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.