Kibana – Creating Reports Using Kibana

Reports can be easily created by using the Share button available in Kibana UI.

Reports in Kibana are available in the following two forms βˆ’

  • Permalinks
  • CSV Report

Report as Permalinks

When performing visualization, you can share the same as follows βˆ’

Use the share button to share the visualization with others as Embed Code or Permalinks.

In the case of Embed code, you get the following options βˆ’

You can generate the iframe code as a short URL or long URL for a snapshot or saved object. Snapshot will not give the recent data and the user will be able to see the data saved when the link was shared. Any changes done later will not be reflected.

In the case of a saved object, you will get the recent changes done to that visualization.

Snapshot IFrame code for long URL βˆ’

<iframe src="http://localhost:5601/app/kibana#/visualize/edit/87af
cb60-165f-11e9-aaf1-3524d1f04792?embed=true&_g=()&_a=(filters:!(),linked:!f,query:(language:lucene,query:''),
uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(field:Area),schema:metric,type:max),(enabled:!t,id:'2',p
arams:(field:Country.keyword,missingBucket:!f,missingBucketLabel:Missing,order:desc,orderBy:'1',otherBucket:!
f,otherBucketLabel:Other,size:10),schema:segment,type:terms)),params:(addLegend:!t,addTimeMarker:!f,addToo
ltip:!t,categoryAxes:!((id:CategoryAxis-1,labels:(show:!t,truncate:100),position:bottom,scale:(type:linear),
show:!t,style:(),title:(),type:category)),grid:(categoryLines:!f,style:(color:%23eee)),legendPosition:right,
seriesParams:!((data:(id:'1',label:'Max+Area'),drawLi
nesBetweenPoints:!t,mode:stacked,show:true,showCircles:!t,type:histogram,valueAxis:ValueAxis-1)),times:!(),
type:histogram,valueAxes:!((id:ValueAxis-1,labels:(filter:!f,rotate:0,show:!t,truncate:100),name:LeftAxis-1,
position:left,scale:(mode:normal,type:linear),show:!t,style:(),title:(text:'Max+Area'),type:value))),title:
'countrywise_maxarea+',type:histogram))" height="600" width="800"></iframe>

Snapshot Iframe code for short URL βˆ’

<iframe src="http://localhost:5601/goto/f0a6c852daedcb6b4fa74cce8c2ff6c4?embed=true" height="600" width="800"><iframe>

As snapshot and shot URL.

With Short URL βˆ’

http://localhost:5601/goto/f0a6c852daedcb6b4fa74cce8c2ff6c4

With Short URL off, the link looks as below βˆ’

http://localhost:5601/app/kibana#/visualize/edit/87afcb60-165f-11e9-aaf1-3524d1f04792?_g=()&_a=(filters:!(
),linked:!f,query:(language:lucene,query:''),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(field:Area),
schema:metric,type:max),(enabled:!t,id:'2',params:(field:Country.keyword,missingBucket:!f,missingBucketLabel:
Missing,order:desc,orderBy:'1',otherBucket:!f,otherBucketLabel:Other,size:10),schema:segment,type:terms)),
params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,categoryAxes:!((id:CategoryAxis-1,labels:(show:!t,trun
cate:100),position:bottom,scale:(type:linear),show:!t,style:(),title:(),type:category)),grid:(categoryLine
s:!f,style:(color:%23eee)),legendPosition:right,seriesParams:!((data:(id:'1',label:'Max%20Area'),drawLines
BetweenPoints:!t,mode:stacked,show:true,showCircles:!t,type:histogram,valueAxis:ValueAxis-1)),times:!(),
type:histogram,valueAxes:!((id:ValueAxis-1,labels:(filter:!f,rotate:0,show:!t,truncate:100),name:LeftAxis-1,
position:left,scale:(mode:normal,type:linear),show:!t,style:(),title:(text:'Max%20Area'),type:value))),title:'countrywise_maxarea%20',type:histogram))

When you hit the above link in the browser, you will get the same visualization as shown above. The above links are hosted locally, so they will not work when used outside the local environment.

CSV Report

You can get CSV Report in Kibana where there is data, which is mostly in the Discover tab.

Go to the Discover tab and take any index you want the data for. Here we have taken theΒ index: countries data-26.12.2018. Here is the data displayed from the index βˆ’

You can create tabular data from the above data as shown below βˆ’

We have selected the fields from Available fields and the data seen earlier is converted into a tabular format.

You can get the above data in CSV report as shown below βˆ’

The share button has an option for CSV reports and permalinks. You can click on CSV Report and download the same.

Please note to get the CSV Reports you to need to save your data.

Confirm Save and click on the Share button and CSV Reports. You will get the following display βˆ’

Click on Generate CSV to get your report. Once done, it will instruct you to go to the Management tab.

Go to Management Tab β†’ Reporting

It displays the report name, created at, status and actions. You can click on the download button as highlighted above and get your CSV report.

The CSV file we just downloaded is as shown here βˆ’

Leave a Reply