I'm trying to use Kibana 5.X to render data from an ES 5.X that is populate using an open source project, Apache Unomi.
I'm pretty new to ES and even more to Kibana so I could be miss understanding how to reach my goal, I have spent some time reading the documentation and the forum but could not find what I needed.
I have a query which may not be perfect (if anyone know a better way to do that, you are welcome) but does work and now I would like to display the result of this query using Visualize > Metric (one big number...), but I tried to reproduce my query using Kibana UI and could not do it, again they might have a better way to display this information and therefore to do it.
So I'm getting all docs of type event with a property eventType = view and then I'm aggregating those docs using their property sessionId.keyword, which basically give the number of pages view by session and then I'm using this aggregate to calculate the average pages view per session which is the number that I would like to display using Visualize > Metric
Also I have a bonus question, I didn't spend a lot of time on this one to be honest, and found some information on google but most of them are pretty old.
Is it possible to create a visualization or a dashboard that display its visualization based on a parameter in its URL?
My final goal is to build a generic dashboard that will display information based on a page path for example, so I will just display the dashboard in an iframe and add the page path to the url of the dashboard.
This is a really cool idea, but unfortunately the metric visualization doesn't provide a way to do anything other than a metric aggregation. There's no way in the Metric Visualize builder to start with a bucket aggregation and then pipe the data into an avg_bucket pipeline aggregation.
This isn't documented, but the Dashboard URLs are made up of variables and conditions that are encoded in RISON. If you can de-code and re-construct those variables, then you can replace the values how you want. If you want to show a different dashboard based on a "page path," then look closely at how the URL changes when you add or remove a filter for that page path.
Another way to possibly do what you want would be to programmatically create saved dashboards that you need by constructing saved objects to store in the .kibana index. If you want to be able to show different dashboards in an iframe, you could just switch the _id of the dashboard in the iframe url. You can specify your own _id at index time, which would help a lot there.
If you don't have very many dashboards that you have to manage, you could also create a Markdown visualization that has links to the different dashboards. The Markdown viz would act as a control widget to navigate to different dashboards. Just add that visualization to each dashboard.
This actually will be possible in 5.4.0. There are new pipeline aggregation options available for most of the visualization types. For Metric aggregation, you'll be able to select "Average Bucket" as the aggregation type, and then choose a terms aggregation and a metric aggregation. I've played with this a little bit in a preview build and it looks like it can do exactly what you want.
I'm getting all docs of type event with a property eventType = view
For this part, you would want to make a saved search for these docs, and then base the visualization off of that saved search.
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.