I have installed kibana-4
on my Linux machine. My requirement is that I want to delete options like save search fields in my kibana home page and i want to change the top menubar of kibana by my own customized menubar.
here 's snapshot of what i want to do.
Kibana 4 is not well documented yet. You might need to dig into the code to understand how things work.
This being said, you may want to use 'embed=true|false' URL parameter to show or not the whole toolbar. This is useful when embeding kibana in iframe, so that parameters are injected from outside and users cannot change settings.
Example to display a dashboard named 'demo' with no toolbar:
http://<hostname>/#/dashboard/demo?embed=true&_g=(time:(from:now-90d,mode:quick,to:now),title:demo)
You may then create your own menus and drive the iframe that embeds Kibana.
Hope this helps.
This is very simple to do, but this isn't externally exposed so you'll need to modify the code to do this.
I will explain, but please note that this is correct for April 2015 (The code changes fast in the kibana repo)
The top menu bar
Each page there is called a 'plugin' in kibana terminology.
The code base has a directory called 'plugins' and there you will find directories for 'Discover', 'Visualize', 'Dashboard' and 'Settings'.
Each one of these directories has an index.js
file in it. Look for the part that registers this plugin to the registry.
It should look something like this :
var apps = require('registry/apps');
apps.register(function DashboardAppModule() {
return {
id: 'dashboard',
name: 'Dashboard',
order: 2
};
});
You can comment this out, and it shouldn't appear in the menu any more.
Side menu (next to the search bar)
Go to the file plugins/discover/index.html
. There you will find the html that renders this menu. It looks something like this :
<kbn-tooltip text="Save Search" placement="bottom" append-to-body="1">
<button ng-click="configTemplate.toggle('save')"><i class="fa fa-save"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Load Saved Search" placement="bottom" append-to-body="1">
<button ng-click="configTemplate.toggle('load')"><i class="fa fa-folder-open-o"></i></button>
</kbn-tooltip>
<kbn-tooltip text="Settings" placement="bottom" append-to-body="1">
<button ng-click="configTemplate.toggle('config')"><i class="fa fa-gear"></i></button>
</kbn-tooltip>
You could just comment that out, or remove it, and you won't see those buttons anymore.
Notes
If all you want to do is display a dashboard on a monitor, then you should use the 'embed' feature. Click on the 'share' button when viewing a dashboard and you will get a snippet allowing you to display a dashboard in an iframe.
Removing the menus like I explained will not prevent someone from reaching those pages/endpoints in the system. This shouldn't be done as a security precaution, if you want to display the dashboard externally but don't want users to play with your data!
You can use the iframe available with share option in kibana.
If it helps anybody. I too had a similar problem where in the new kibana-4 the kibana search bar was being displayed in the embed, which I found distracting as we are embedding the charts on our own analytics dashboards. So I could remove the search bar by changing the embed code as follows:
Currently when you copy embed code from Kibana you get:
<iframe src="https://your-es-url.com/_plugin/kibana/?embed&#/dashboard/My-Dashboard?_g=(refreshInterval:(display:Off,pause:!f,section:0,value:0),time:(from:now-24h,mode:quick,to:now))&_a=(filters:!(),panels:!((col:1,id:'Unprocessed-Stock-Calls-(Status-%3C-3)',row:1,size_x:12,size_y:4,type:visualization),query:(query_string:(analyze_wildcard:!t,query:'*')),title:'My%20Dashboard')" height="600" width="800"></iframe>
This by default shows the kibana search bar. But you can just reorder the embed code as follows, where you move the refresh interval to the end, it stops displaying the search bar and the visualisation loads up nicely.
<iframe src="https://your-es-url.com/_plugin/kibana/#/dashboard/My-Dashboard?embed&_a=(filters:!(),panels:!((col:1,id:'Unprocessed-Stock-Calls-(Status-%3C-3)',row:1,size_x:12,size_y:4,type:visualization),query:(query_string:(analyze_wildcard:!t,query:'*')),title:'My%20Dashboard')&_g=(refreshInterval:(display:Off,pause:!f,section:0,value:0),time:(from:now-24h,mode:quick,to:now))" height="600" width="800"></iframe>
来源:https://stackoverflow.com/questions/29602467/can-i-change-top-menu-bar-and-remove-some-options-in-kibana-4