- Kibana Guide: other versions:
- What is Kibana?
- What’s new in 7.8
- Get started
- Set up Kibana
- Discover
- Dashboard
- Canvas
- Maps
- Machine learning
- Graph
- Visualize
- Logs
- Metrics
- APM
- Uptime
- SIEM
- Dev Tools
- Stack Monitoring
- Management
- Advanced Settings
- Alerts and Actions
- Beats Central Management
- Cross-Cluster Replication
- Index Lifecycle Policies
- Index Management
- Ingest Node Pipelines
- Index patterns and fields
- License Management
- Numeral Formatting
- Remote Clusters
- Rollup Jobs
- Saved Objects
- Security
- Snapshot and Restore
- Spaces
- Upgrade Assistant
- Watcher
- Ingest Manager
- Reporting
- Alerting and Actions
- REST API
- Kibana plugins
- Accessibility
- Limitations
- Breaking Changes
- Release Notes
- Kibana 7.8.1
- Kibana 7.8.0
- Kibana 7.7.1
- Kibana 7.7.0
- Kibana 7.6.2
- Kibana 7.6.1
- Kibana 7.6.0
- Kibana 7.5.2
- Kibana 7.5.1
- Kibana 7.5.0
- Kibana 7.4.2
- Kibana 7.4.1
- Kibana 7.4.0
- Kibana 7.3.2
- Kibana 7.3.1
- Kibana 7.3.0
- Kibana 7.2.1
- Kibana 7.2.0
- Kibana 7.1.1
- Kibana 7.1.0
- Kibana 7.0.1
- Kibana 7.0.0
- Kibana 7.0.0-rc2
- Kibana 7.0.0-rc1
- Kibana 7.0.0-beta1
- Kibana 7.0.0-alpha2
- Kibana 7.0.0-alpha1
- 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.