Displaying n-greatest in Kibana - kibana

In my elasticsearch backend, I have a index stats with a numerical field and a #name field.
I would like to display a pie chart (or some other panel type) in Kibana where you can list the top N #name where the percentage in the pie represents the percent of the total fields are represented.
For example, in one index, you might have
#Name: John
Field: 5
#Name: Robert
Field: 5
Then I would have a pie chart with John and Robert both at 50%. Is this possible on Kibana?

Yes what you are trying is very much possible in Kibana 4 with simplicity & ease.
If i am able to understand correctly you want to show TOP N results of a specific field in pie chart.
To do so follow the following steps:
Clicking on pie chart under visualize tab (Create a new visualization).
Selecting a search source - From a new search
Go to Split Slices, select aggregation as terms.
Then enter the field and select TOP in order & size (denote no of records you want) ex:5 will show TOP 5 records.
Click on Apply & the pie chart would be generated :)
PS: Feel free to contact me for any further issue, would be happy to guide :)

Yes; It is possible in Kibana; If we are using Kibana latest version then it would be easy for you to create visualization; Look for Pie-chart in visualization and then proceed next; Fill the appropriate fields and I hope it is not that tough to understand while filling the fields; It will render the pie chat on clicking the "Green" > button.

Related

Tableau - Filter Buttons not filtering correctly

I created filter buttons to use as a filter for 6 category's (measures) in Tableau Public (latest version) to filter 2 different graphs called - "Military Enrollment by Branch & War Films" as well as "Military Enrollment & Year-Over-Year Change". What I need is to be able to click on each category name (Army, Marines, War Films, etc) and for both charts to only give me data for the category selected on my dashboard. However, what is happening is that when I click on one of the buttons it displays the values for a bunch of categories instead of one and is also showing the data for specific years instead of the values for all of the years for whichever category I clicked on. Some of the years it is showing is 1980 or 1981-1983 whereas it should be displaying all the values across all years on the x-axis (from 1980-2021). It is also not showing any values for "War Films". The buttons are not working correctly and I can't find out why it is doing this.
Another issue is I can't get the "Reset Button" to work to clear all filters.
For reference I am using the worksheet called "Filter Images" for my buttons.
Attached is the workbook link: https://public.tableau.com/views/LastOne_16419877017470/Dashboard?:language=en-US&publish=yes&:display_count=n&:origin=viz_share_link
This is the chart without any button filters applied:
enter image description here
Example of what it shows when I click on "Marines", it's showing me data for multiple measures when I only selected one and it's showing me data for the year 1983 instead of data for Marines from 1980-2021.
enter image description here
That was VERY strange (until I looked at your data)
You only have Category values for 1983 but you also have all the Categories as separate measures as well.
You need to work on the data & I hate to have to say it now, but I think you should pivot your data and have 3 columns - Category, Year, Headcount (or whatever) but this will mean rebuilding a LOT of your dashboard again.

Kibana pie chart for text data

I have text data in Elastic, field name is buildResult , type is text and value can be either Success or Failure:
I want to have Pie chart to illustrate Success vs Failure
Could you please advice on chart setup or share some example for text type?
Split the piechart using text filters to get the result you want.
The picture below is taken from the data configuration of the piechart visualization in Kibana.
This works for string fields - I guess it would work for text fields also.
From what i know the best way is to use keyword data type in these cases
elasticsearch keyword
when the field is keyword you can use simple terms aggregation to split the pie between the deferent keywords

How to list unique values of a particular field in Kibana

I am having a field named rpc in my elasticsearch database and I am displaying it using Kibana. When I search in search bar of kibana like:
rpc:*
It display all the values of rpc field but I want to have only those value to be displayed which are unique.
I have been playing around with Kibana4 since a couple of weeks now. I find it intuitive and simple and the experience has been great till now. Following your question, I tried getting unique results via a Data Table visualization. Why? Because I personally find it easier to understand. Following are the steps:
1. Get unique count
Create the visualization (Visualize -> Data Table). First lets get
the count of how many unique entries we have for a particular field
(We will use this in the later part for verification). I'm using
clientip.raw but as I see, it will work just fine with any friendly
field name too.
2. Set the aggregation right
Set you aggregation back to count and have a Split Rows as follows. Not doing this will give you count 1 for each field value (since it is looking for unique counts) when you populate the table. Noteworthy part is setting the Top field to 0. Because Kibana won't let you enter anything else than a digit (Obviously!). This was the tricky part. Hit Apply and you'll get the results. Unique field values and the count of each of them.
3. Verification:
Going to the last page of the table, we see there are exactly 543 results. This is how I know it works.
What Next?
You save this visualization and add it to a Dashboard. There you can always check the request, query, response and other stats.
Just an addition to the above mathakoot answer.
For the user of newer version (which do not allow bucket size of 0 anymore) just set a value greater than the maximum number of result
And report the value in the Options>Per Page field
I am using Kibana 6 so the UI looks a bit different than the older answers here.
Here is what worked for me
Create a visualization from your query, I used a line graph type (don't think it matters)
Under Data, set metrics aggregation = "Unique Count" and set field to your field.
Set x-axis aggregation = "Terms" and set field to your field.
Set Size > your number of records
Under Metrics and Axes, disable drawing of the graph, circles, and labels (this really helps the UI not lag)
Run query and then click "Inspect" and download CSV
Data
Metrics & Axes
I wanted to achieve something similar but I'm stuck with Kibana 3.1.
I simply added a panel of type "TERMS" and configured its Field = User-agent and left everything else on default values. This gave me a nice bar chart with one bar for each User-agent.

To compare n number of fields in Kibana

Is there a way to compare two or more fields,as per requirement in Kibana?. Each document consists only 10 fields and the index consisits of only 50 documents. So is there a simple way to compare two or more fields?
From what I understand,you need a way,so that you could see all the fields and make random comparisons between fields. Kibana offers one such simple feature. This can be done by creating a new panel inside a row and selecting the panel type "table". This lists all your fields in the left side with selection checkboxes and then you can select any of them. On selection,the field details would get added as new coloumns to the right as show below.
A more detailed guide on how to use the above feature can be found in this blog

Google's Fusion Tables Layer: IN query - what about multiple columns?

I want a google map where I can query different columns from my fusion table to display on the map when a user selects a checkbox. Google's Fusion Tables Layer Example: IN query is great if the data you want to display is in one column, but mine is in multiple columns, and I am not a programmer and cannot figure this out.
Is it possible to query different columns to display on your map using checkboxes?
Lets use the IN query example from above.
Here is the map and code: https://developers.google.com/fusiontables/docs/samples/in
Here is the fusion table: https://www.google.com/fusiontables/DataSource?docid=15UY2pgiz8sRkq37p2TaJd64U7M_2HDVqHT3Quw
Lets say there are additional columns to the fusion table: A, B, and C with a "yes" or "no" value like the delivery column.
I want the map to load with all stores displayed, and
I want checkboxes for:
delivery
A
B
C
So the user can select/deselect these using the checkbox and then those with "yes" will display on the map.
Is this even possible? If so, could someone please provide the code? I have looked everywhere and cannot find an example like this that pulls from different columns.
Thank you!
Consider using Derek Eder's Searchable Map Template, which lets you build a filtered map such as you are describing.

Resources