- Print
- PDF
Use Kibana/OpenSearch
- Print
- PDF
Available in VPC
Kibana and OpenSearch Dashboards are open-source interfaces for visualizing and exploring data saved in Elasticsearch and OpenSearch clusters. You can use the data to create various charts and manage clusters. The Search Engine Service supports Kibana version 7.7.0 for Elasticsearch clusters and OpenSearch Dashboards version 1.3.3 for OpenSearch clusters. The following is what is described in Use Kibana/OpenSearch.
- Start Kibana: how to access Kibana, default screen guide
- Start OpenSearch Dashboards: how to access OpenSearch Dashboards, default screen guide
- Dev Tools: guide on console in Dev Tools menu for easy API calls
- Manage data: guide on how to save and view data using API, create index patterns, and search data from the Discover menu
- Manage snapshot: guide on how to create a snapshot using API, check the cause of a snapshot creation failure, restore data using a snapshot, and delete a snapshot
- Among Kibana and OpenSearch Dashboards' features, only a few frequently used features to utilize the Search Engine Service are described here.
- For more information about Kibana, see Kibana Guide.
- For more information about OpenSearch Dashboards, see OpenSearch Dashboards.
Start Kibana
You need to access Kibana first to use Kibana. You can check Kibana's various menus after logging in.
Access to Kibana
When you create an Elasticsearch cluster, Kibana is automatically installed and runs on the manager node.
Before accessing Kibana from outside, check the following:
- You must set up a manager node connection. Proceed with 1 Create Target Group ~ 4. ACG settings of manager node of Connect to manager node using SSH.
- Check the load balancer IP address connected to the manager node.
- In the console, go to Services > Networking > Load Balancer > Load Balancer menu and check the connection information of the load balancer.
- Check your Kibana access ID and password.
- You can check ID and set password in Cluster > Manage cluster > Reset access password menu.
The following describes how to access Kibana from outside.
- Access
load balancer IP address:80
from a web browser.- Connect to port number 5601 that was forwarded to port number 80.
- When the following window appears, enter Kibana access information and click the [Login] button.
- Username: enter Kibana access ID
- Password: enter Kibana access password
- You can use sample data by clicking the [Try our sample data] button on the first screen that appears after logging in.
Kibana screen
The basic description of the Kibana screen is as follows:
Field | Description |
---|---|
① Home, menu name | |
② Kibana menu | |
③ Kibana information | |
Start OpenSearch Dashboards
To use OpenSearch Dashboards, you must first access OpenSearch Dashboards. You can check OpenSearch Dashboards' various menus after logging in.
Access OpenSearch Dashboards
When you create an OpenSearch cluster, OpenSearch Dashboards are automatically installed and run on the manager node.
Before accessing Kibana from outside, check the following:
- You must set up a manager node connection. Proceed with 1 Create Target Group ~ 4. ACG settings of manager node of Connect to manager node using SSH.
- Check the load balancer IP address connected to the manager node.
- In the console, go to Services > Networking > Load Balancer > Load Balancer menu and check the connection information of the load balancer.
- Check your Kibana access ID and password.
- You can check ID and set password in Cluster > Manage cluster > Reset access password menu.
The following describes how to access OpenSearch Dashboards from outside.
- Access
load balancer IP address:80
from a web browser.- Connect to port number 5601 that was forwarded to port number 80.
- When the following window appears, enter OpenSearch Dashboards access information and click the [Log In] button.
- Username: Enter the OpenSearch Dashboards access ID
- Password: Enter the OpenSearch Dashboards access password
- You can use sample data by clicking the [Add data] button on the first screen that appears after logging in.
OpenSearch Dashboards screen
The basic description of the OpenSearch Dashboards screen is as follows:
Field | Description |
---|---|
① Basic menu | |
② OpenSearch Dashboards | |
③ OpenSearch Plugins | |
④ Management |
Dev Tools
You can easily use the API and get the results of your request using the Console in the Dev Tools menu. The basic description of the Dev Tools screen is as follows:
Field | Description |
---|---|
① Console features | |
② Input field | Command input field
|
③ Results field | Display the result of executing a command |
Manage data
You can use Kibana and OpenSearch Dashboards to manage data. You can save and view data through API in Console in the Dev Tools menu. You can also create index patterns and search data saved in clusters.
Data storage
The following describes how to save data through the API:
- Click the Dev Tools menu from Kibana and OpenSearch Dashboards.
- Call the API from the Console to save the data.
- The saved result appears on the right screen.
- <Example 1> Save data with name and dept fields in index test
PUT test/_doc/1 { "name" : "asd", "dept" : "Document Management" }
- <Example 2> Create an index with 3 primary shards and 1 replica shard without data
PUT my_index { "settings": { "index": { "number_of_shards": 3, "number_of_replicas": 1 } } }
View data
Here's how to view data saved in the cluster through the API.
- Click the Dev Tools menu from Kibana and OpenSearch Dashboards.
- View the data by calling the API from the Console.
- The search results appear on the right screen.
- <example> View data in index test
GET test/_search { "query" : { "match_all" : {} } }
Create index pattern
You must first create an index pattern to use the index in Kibana and OpenSearch Dashboards. You can view and manage data from multiple indexes at once through index patterns.
To create an index pattern, data must be saved in the cluster.
The following describes how to create an index pattern:
- In Kibana and OpenSearch Dashboards, click the Management or Stack Management menu.
- Click on the Index Patterns menu.
- Click on the [Create index pattern] button.
- Enter an index pattern for verification in Kibana and OpenSearch Dashboards.
- The index that matches the specified index pattern is displayed.
- Click on the [Next step] button.
- Check the Configure settings and click on the [Create index pattern] button.
- If you have date/time data, select the corresponding field in the Time Filter field name or Time field.
- It displays information about the created index pattern.
Search data
You can search for data saved in a cluster from Kibana and OpenSearch Dashboards' Discover menu.
To search for data, you must first create an index pattern.
The following describes how to search for data in a cluster.
- Click the Discover menu from Kibana and OpenSearch Dashboards.
- Select the index pattern you want to view from the dropdown menu.
- Data of the index included in the selected index pattern are displayed.
- Data of the index included in the selected index pattern are displayed.
- Enter a keyword (<example>
name:asd
) in the search window and click the [Enter] key to check the search results.- You can select a field to view only the information for the desired field.
Manage snapshot
You can create and delete a snapshot using the Console in Kibana and OpenSearch Dashboards' Dev Tools menu. If snapshot creation fails, you can determine the cause of failure, or you can restore data using the created snapshot.
- Japan Region does not support snapshot-related features.
- To create and manage snapshots in object storage, you must Set API authentication key.
Create snapshots through Elasticsearch and OpenSearch API
If you want to rename the folder where you want to save the snapshot, or if snapshot creation fails due to a timeout in the console, you can create the snapshot directly through the Elasticsearch and OpenSearch API in Kibana and OpenSearch Dashboards.
- However, if you create a snapshot directly through the Elasticsearch and OpenSearch API, you cannot check the snapshot creation history from the console.
The following describes how to create a snapshot directly through the Elasticsearch and OpenSearch API:
Click the Dev Tools menu from Kibana and OpenSearch Dashboards.
In the Console, execute the following command to create a repository.
PUT _snapshot/my-own-snapshot-repository { "type" : "s3", "settings": { "region" : "kr", "endpoint" : "https://kr.object.private.ncloudstorage.com", "bucket": "estest", "compress": true, "base_path": "my-folder", "path_style_access": true } }
my-own-snapshot-repository
: enter the desired repository namebase_path
: enter the desired folder name- If you enter a folder name that is being used by another cluster, the snapshot file may not work properly.
region
- For Korea region:
kr
- For Singapore region:
sgn
- For Korea region:
endpoint
- For Korea region:
https://kr.object.private.ncloudstorage.com
- For Singapore region:
https://sg.object.private.ncloudstorage.com
- For Korea region:
In the Console, execute the following command to call the snapshot creation API.
POST _snapshot/my-own-snapshot-repository/my-own-snapshot-name
my-own-snapshot-repository
: enter the repository name created in step 2my-own-snapshot-name
: enter the desired snapshot name- If you call the API by specifying the index as follows, you can create a snapshot only for the index you want.
PUT _snapshot/my-own-snapshot-repository/my-own-snapshot-name { "indices": "myindex, myindex2" }
- You can check the created snapshot in the specified path in the object storage.
Check the cause of the snapshot creation failure
The following is how to determine the cause of a snapshot creation failure in Kibana and OpenSearch Dashboards:
- Click the Dev Tools menu from Kibana and OpenSearch Dashboards.
- After executing the
GET _snapshot
command in the Console, check the repository of the snapshot that failed to be created.- A list of repositories appears on the right screen.
- Execute the following command to check the detailed status of the snapshot.
GET _snapshot/"Repository of snapshot"/"Snapshot name"
Restore snapshot
You can use the snapshots to restore data in a cluster or move data from one cluster to another.
In order to restore a snapshot, you must have created the snapshot that you want to restore (refer to Create snapshot or Create snapshots through Elasticsearch and OpenSearch API).
The following describes how to restore a snapshot.
Click the Dev Tools menu from Kibana and OpenSearch Dashboards.
In the Console, execute the following command to create a repository to restore.
PUT _snapshot/restore-repository { "type" : "s3", "settings": { "region" : "kr", "endpoint" : "https://kr.object.private.ncloudstorage.com", "bucket": "estest", "compress": true, "base_path": "estest-1722213", "path_style_access": true } }
region
- For Korea region:
kr
- For Singapore region:
sgn
- For Korea region:
endpoint
- For Korea region:
https://kr.object.private.ncloudstorage.com
- For Singapore region:
https://sg.object.private.ncloudstorage.com
- For Korea region:
bucket
: name of the bucket where the snapshot to be restored existsbase_path
: name of the folder where the snapshot to be restored is located (cluster name- cluster number
)You can run the following command to check that the repository was created successfully.
GET _snapshot
You can check the list of snapshots that exist in the repository by running the following command:
GET _cat/snapshots/restore-repository
Execute the following command to check the list of indexes that can be restored and exist in the snapshot.
GET _snapshot/restore-repository/"Snapshot name"
Execute the following command to check the list of indexes that currently exist in the cluster.
- If an index with the same name from the index you want to restore exists in the cluster, then it can't be restored.
GET _cat/indices
Execute the command to restore the desired index.
- Restore for specific indexes
- <example> Restore for
metricbeat-7.7.0-2021.06.23
POST _snapshot/restore-repository/test4/_restore { "indices": "metricbeat-7.7.0-2021.06.23", "ignore_unavailable": true }
- <example> Restore for
- Restore for multiple indexes using wildcards (*)
- <example> Restore for all indexes starting with
metricbeat
POST _snapshot/restore-repository/test4/_restore { "indices": "metricbeat*", "ignore_unavailable": true }
- <example> Restore for all indexes starting with
- Restore for all indexes except for specific indexes
- <example> Restore for all indexes except
kibana
POST _snapshot/restore-repository/test4/_restore { "indices": "-.kibana*", "ignore_unavailable": true }
- <example> Restore for all indexes except
- If set to
"indices": "*"
, restore is attempted for all indexes, and the restore fails if duplicate indexes exist.
- Restore for specific indexes
Run the following command to check if the index was restored successfully.
- Immediately after restoration, the status of the index may be temporarily yellow, and the status of the cluster may be in the warning status.
GET _cat/indices
Delete snapshot
Click the Dev Tools menu from Kibana and OpenSearch Dashboards.
In the Console, execute the following command to delete a snapshot.
DELETE _snapshot/restore-repository/test4
- You can check that the snapshot has been deleted by running the following command:
GET _cat/snapshots/restore-repository
- You can check that the snapshot has been deleted by running the following command:
A timeout response may occur when deleting a snapshot that has a large capacity. This is a phenomenon that occurs when the time spent exceeds 30 seconds, and snapshot deletion occurs normally in the background.