Software AG Products 10.7 | Configuring API Gateway | API Gateway Configuration | Connecting to an External Kibana
 
Connecting to an External Kibana
Considerations when you configure an External Kibana:
*Ensure the Kibana version is compatible with the Elasticsearch version as Kibana and Elasticsearch have a one-to-one mapping. For details on version compatibility, see Support Matrix.
*Turn off Kibana auto start in one of the following ways:
*By using Externalized configuration files. For details, see Using the Externalized Configuration Files. Software AG recommends using this configuration.
*By setting the property apigw.kibana.autostart to false located in C:\API Gateway instance\profiles\IS_default\apigateway\config\uiconfiguration.properties.
You can have one of the following Kibana configurations:
*Default Kibana connected to API Gateway Data Store.
*External Kibana connected to API Gateway Data Store.
You can configure this setup as follows:
For an external Kibana to connect to API Gateway Data Store you have to configure the following properties in the kibana.yml file where you have installed the external Kibana.
Property
Description
server.port: port number
Specifies which server port to use.
Example: 9405
server.host: server host IP address or host name
Specifies the host to bind the server to.
The default value is localhost, which means the remote machines will not be able to connect. To allow connections for remote users you must set this parameter to a non-loopback address.
Example: "0.0.0.0"
server.basePath: server path of the proxy
Specifies the proxy setting to render the charts from the external Kibana in API Gateway UI.
The server path you specify must not end with a /.
Value: "/apigatewayui/dashboardproxy"
elasticsearch.hosts: http://hostname:port
Specifies the URLs of the Elasticsearch instance to use for all your queries.
Example: "http://localhost:9240"
kibana.index: gateway_tenant_name_dashboard
Specifies the index in Elasticsearch, which Kibana uses to store saved searches, visualizations, and dashboards. It creates a new index if it does not exist.
Example: "gateway_default_dashboard"
You can find these values in the kibana.yml file of the internal Kibana installed location C:\API Gateway instance\profiles\IS_default\apigateway\dashboard\config. You can copy these values in the kibana.yml file of the external Kibana in the respective installed location.
If you are using a Kibana version different than the one shipped with API Gateway that is compatible with the Elasticsearch version, you have to specify the Kibana version in the config.json file located at C:\API Gateway instance\IntegrationServer\instances\default\packages\WmAPIGateway\config\resources\kibana\config\7\. For details on version compatibility, see Support Matrix.
*Default Kibana connected to External Elasticsearch.
*If the external Elasticsearch is used to store all API Gateway assets then configure the following:
Open the kibana.yml file located at C:\API Gateway instance\profiles\IS_default\apigateway\dashboard\config and specify the external Elasticsearch host and port details, which the Kibana has to connect to, as follows:
# The Elasticsearch instance to use for all your queries.
elasticsearch.hosts: "http://host_name:port"
*If the external Elasticsearch is used to store only the analytics and the core configuration is stored in the API Gateway Data Store, then configure the following:
Copy the kibana.index (gateway_tenant-name_dashboard) from the Elasticsearch that stores the core configurations to the Elasticsearch that stores the analytics data. This can be achieved by using the reindex API. Reindex supports reindexing from a remote Elasticsearch cluster. The sample payload is as follows:
POST _reindex
{
"source": {
"remote": {
"host": "https://host:port",
"username": "username",
"password": "password"
},
"index": "gateway_tenant-name_dashboard",
},
"dest": {
"index": "gateway_target-tenant-name_dashboard"
}
}
The host parameter must contain a scheme, host, and port. The username and password parameters are optional, and when they are present _reindex connects to the remote Elasticsearch node using basic auth.
For details about the reindex API, see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#reindex-from-remote.
Remote hosts have to be explicitly allowed in elasticsearch.yml using the reindex.remote.whitelist property. It can be set to a comma delimited list of allowed remotehost and port combinations. Scheme is ignored, only the host and port are used. The list of allowed hosts must be configured on the target node where the index is being copied.
*External Kibana connected to External Elasticsearch.
You can configure this setup by using externalized configuration files. For details, see Using the Externalized Configuration Files.