- Kibana Guide: other versions:
- Introduction
- Set Up Kibana
- Getting Started
- Discover
- Visualize
- Dashboard
- Canvas
- Graph data connections
- Machine learning
- Maps
- Infrastructure
- Logs
- APM
- Uptime
- Dev Tools
- Monitoring
- Management
- Reporting from Kibana
- REST API
- Kibana plugins
- Limitations
- Release Highlights
- Breaking Changes
- Release Notes
- Developer guide
IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Communicating with Elasticsearch
editCommunicating with Elasticsearch
editKibana exposes two clients on the server and browser for communicating with elasticsearch. There is an admin client which is used for managing Kibana’s state, and a data client for all other requests. The clients use the elasticsearch.js library.
Server clients
editServer clients are exposed through the elasticsearch plugin.
const adminCluster = server.plugins.elasticsearch.getCluster('admin'); const dataCluster = server.plugins.elasticsearch.getCluster('data'); //ping as the configured elasticsearch.user in kibana.yml adminCluster.callWithInternalUser('ping'); //ping as the user specified in the current requests header adminCluster.callWithRequest(req, 'ping');
Browser clients
editBrowser clients are exposed through AngularJS services.
uiModules.get('kibana') .run(function (es) { es.ping() .catch(err => { console.log('error pinging servers'); }); });
On this page
Was this helpful?
Thank you for your feedback.