How to generalize the kibana visualization (bar chart)

In Kibana visualization (bar chart), i have created the bar chart for one of the index pattern (eg: Aircel), I have created the another index pattern (eg: Nationwide), having the similar columns for both index patterns with different data.

My Question is how can create a common visualization of Bar chart (called as bar chart template) so that it can be used for both 'Aircel' and 'Nationwide' indexes.

can you please help me on this. Thanks in advance.

I don't think this is doable now.

If you have separate indexes, I think you can create alias for both indexes, and then add as an index pattern. After that, you can create a visualization for the new index pattern which can present data from both indexes.

  • For Aircel, create alias log-Aircel
  • For Nationwide, create alias log-Nationwide

Add a new index pattern log-* in Kibana, then create visualization for this index pattern.

Thanks Anh..

I followed the steps as suggested by you.. it worked for me..
I created the indexes as 'log-Aircel', 'log-Nationwide'
and created a new index 'log-common' and ran the below script in 'Dev Tools' (left navigation link)

POST /_aliases
{
"actions" : [
{ "add" : { "index" : "log-Aircel", "alias" : "log-common" } },
{ "add" : { "index" : "log-Nationwide", "alias" : "log-common" } }
]
}
And created the visualizer 'month-aircel-nationwide' using the 'log-common'
Able to see the data plotted for both (aircel , nationwide)
Thanks for your help.

Is there any possibility that i can send an index type as a parameter so that it can draw only the specific index graph.
Eg: I will be using the 'month-aircel-nationwide' visualizer, in this if i pass 'log-aircel' as a parameter then it should plot the data relevant to it.
If is pass 'log-nationwide' as a parameter it should plot the data relavent to it.
without modifying the 'month-aircel-nationwide' visualizer.

Could you please suggest me on this.
Thanks for your help.

[quote="kiranilla, post:3, topic:76480"]

Thanks for your help Anh

Is there any possibility that i can send an index type as a parameter so that it can draw only the specific index graph?
Eg: I will be using the 'month-aircel-nationwide' visualizer, in this if i pass 'log-aircel' as a parameter then it should plot the data relevant to it.If is pass 'log-nationwide' as a parameter it should plot the data relavent to it.without modifying the 'month-aircel-nationwide' visualizer.

Could you please suggest me on this. Thanks in advance.

Since you create one single index pattern for both indexes, I think you put filter as a parameter that filter by the data type in each index. I hope the type field is different for each index, i.e., "type": "aircel" and "type": "nationwide"

If you already used that two index names, creating a log-* index pattern in Kibana is good enough. There's no need for alias unless you want to do something else.

Thank you Anh... for your help

I tried but i am not able to get the expected result.
I tried putting the filters but i have ended with an error

Please suggest on this:
Is there any possibility that i can use query param in the url to indicate the index
Eg: Below is the url which is being used to draw the above graph
http://localhost:5601/app/kibana#/visualize/edit/a6360410-fcca-11e6-bd1a-85777ea55e3f?_g=

can i use the "?index="log-nationwide" at the end of the url to get the required result.
something which is shown below
http://localhost:5601/app/kibana#/visualize/edit/a6360410-fcca-11e6-bd1a-85777ea55e3f?index="log-nationwide"

Please suggest, thanks in advance

The URL you post looks like a shortened URL. This is how it looks on my Kibana
http://localhost:5601/app/kibana#/visualize/edit/Free-disk-space-over-days?_g=(filters:!(('$$hashKey':'object:886','$state':(store:globalState),meta:(alias:!n,disabled:!f,index:'metricbeat-*',key:type,negate:!f,value:metricsets),query:(match:(type:(query:metricsets,type:phrase))))),refreshInterval:(display:'1%20minute',pause:!t,value:60000),time:(from:now-7d,mode:quick,to:now))&_a=(filters:!(),linked:!t,query:(query_string:(query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(field:system.fsstat.total_size.free),schema:metric,type:avg),(enabled:!t,id:'2',params:(customInterval:'2h',extended_bounds:(),field:'@timestamp',interval:d,min_doc_count:1),schema:segment,type:date_histogram)),listeners:(),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,legendPosition:right,mode:stacked,scale:linear,setYExtents:!f,shareYAxis:!t,times:!(),yAxis:()),title:'Free%20disk%20space%20over%20days',type:histogram))

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