API Gateway 10.11 | Administering API Gateway | Deployment | Deployment Configurations | Configure Kibana With External Elasticsearch
 
Configure Kibana With External Elasticsearch
The API Gateway stores its data in an internal Elasticsearch called API Data store by default. Core data and analytics data are stored separately and the analytics data can be stored in an external Elasticsearch. This sections explains how to configure API Gateway Kibana with the external Elasticsearch so that the analytics data can be viewed from the API Gateway Dashboard.
Configure internal Kibana to the external Elasticsearch
1. Navigate to the location <SAGInstaller>\profiles\IS_default\apigateway\config.
2. Open the uiconfiguration properties file located at <SAGInstaller>\profiles\IS_default\apigateway\config.
3. Set the property apigw.kibana.autostart to false.
4. Open the kibana.yml file and add the following command-
elasticsearch.hosts:"http://<ExternalElasticsearchHost>:<ExternalElasticsearhPort>"
This command connects Kibana to the external Elasticsearch's host and port.
5. Go to Start > Elasticsearch.
6. Start API Gateway.
7. Go to Start > Start API Store <version_number>.
8. Open your REST client.
9. Under Variables, provide the required values in the following fields:
internalESHost-Internal Elasticsearch Host
internalESPort-Internal Elasticsearh Port.
externalESHost-External Elastic Host.
externalESPort-External Elasticsearch Port
10. Make a GET call to the endpoint -
http://localhost:9200/_cat_indices
This reindexes your dashboard from API Data store to Elasticsearch and create templates for "gateway_<tenant-name>_analytics_*" indices.
11. Open API Gateway.
12. Click Administration>Destinations.
13. Select API Gateway option and clear all the checkboxes.
14. Select Elasticsearch>Events and select all the checkboxes.
15. Click Elasicsearch>Configuration.
16. Set Hostname and Port values to the values set in step 11.
Ensure that the index name is gateway_<tenant_name>_analytics. Fox example, if your tenant name is default, then your indexname should be gateway_default_analytics.
17. Click APIs>Create API.
18. Select your API and select Policies tab.
19. Enforce the Traffic Monitoring policy.
20. Invoke the API.
The events appear in the external Elasticsearch deatination.
Now, the invocations should be visible from the API Gateway analytics page.