Skip to content

Commit 1a9ab39

Browse files
Hana-Hasaclaude
andcommitted
opensearch docs EN 2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0480369 commit 1a9ab39

16 files changed

Lines changed: 628 additions & 0 deletions

English/SUMMARY.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,20 @@
760760
* [OpenSearch Cluster Database (ODS)](vdb/opensearch-cluster-database-ods/README.md)
761761
* [What is OpenSearch Cluster Database?](vdb/opensearch-cluster-database-ods/opensearch-cluster-database-la-gi.md)
762762
* [Getting Started with OpenSearch Cluster](vdb/opensearch-cluster-database-ods/bat-dau-voi-opensearch-cluster/README.md)
763+
* [Initialize an OpenSearch Cluster](vdb/opensearch-cluster-database-ods/bat-dau-voi-opensearch-cluster/khoi-tao-mot-opensearch-cluster.md)
764+
* [Access and Work on OpenSearch Dashboard](vdb/opensearch-cluster-database-ods/bat-dau-voi-opensearch-cluster/truy-cap-va-lam-viec-tren-opensearch-dashboard.md)
765+
* [Push data or event logs from Logstash into an OpenSearch Cluster](vdb/opensearch-cluster-database-ods/bat-dau-voi-opensearch-cluster/day-du-lieu-hoac-logs-tu-server-vao-mot-opensearch-cluster-da-khoi-tao.md)
763766
* [OpenSearch Cluster Features](vdb/opensearch-cluster-database-ods/cac-tinh-nang-cua-opensearch-cluster/README.md)
767+
* [Initialize OpenSearch Cluster](vdb/opensearch-cluster-database-ods/cac-tinh-nang-cua-opensearch-cluster/khoi-tao-opensearch-cluster.md)
768+
* [Edit OpenSearch Cluster](vdb/opensearch-cluster-database-ods/cac-tinh-nang-cua-opensearch-cluster/chinh-sua-opensearch-cluster/README.md)
769+
* [Increase Number of Nodes](vdb/opensearch-cluster-database-ods/cac-tinh-nang-cua-opensearch-cluster/chinh-sua-opensearch-cluster/tang-so-luong-node.md)
770+
* [Change Node IOPS Parameters](vdb/opensearch-cluster-database-ods/cac-tinh-nang-cua-opensearch-cluster/chinh-sua-opensearch-cluster/thay-doi-thong-so-iops-cua-node.md)
771+
* [Increase/Decrease Node Disk Size](vdb/opensearch-cluster-database-ods/cac-tinh-nang-cua-opensearch-cluster/chinh-sua-opensearch-cluster/tang-giam-kich-thuoc-o-dia-cua-node.md)
772+
* [Change Master Account Password](vdb/opensearch-cluster-database-ods/cac-tinh-nang-cua-opensearch-cluster/chinh-sua-opensearch-cluster/thay-doi-mat-khau-tai-khoan-master.md)
773+
* [Manage Access to OpenSearch Cluster](vdb/opensearch-cluster-database-ods/cac-tinh-nang-cua-opensearch-cluster/quan-ly-truy-cap-toi-opensearch-cluster.md)
774+
* [Working with Configuration Group](vdb/opensearch-cluster-database-ods/cac-tinh-nang-cua-opensearch-cluster/lam-viec-voi-configuration-group.md)
775+
* [Working with Plugins](vdb/opensearch-cluster-database-ods/cac-tinh-nang-cua-opensearch-cluster/lam-viec-voi-plugin.md)
776+
* [Delete OpenSearch Cluster](vdb/opensearch-cluster-database-ods/cac-tinh-nang-cua-opensearch-cluster/xoa-opensearch-cluster.md)
764777
* [Access Management](vdb/opensearch-cluster-database-ods/quan-ly-truy-cap/README.md)
765778
* [Features, Resources and Access Rights](vdb/opensearch-cluster-database-ods/quan-ly-truy-cap/tinh-nang-tai-nguyen-opensearch-cluster-va-quyen-truy-cap.md)
766779
* [Resource Limits](vdb/opensearch-cluster-database-ods/han-muc-tai-nguyen.md)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Getting Started with OpenSearch Cluster
2+
3+
If you have not used any GreenNode service (have not registered an account with GreenNode), you need to register an account with GreenNode Service [here](https://register.vngcloud.vn/signup) to access File Storage.
4+
5+
Use this guide to get started with OpenSearch Cluster Database. You will learn how to initialize an OpenSearch Cluster, access and work on OpenSearch Dashboard, as well as learn how to push logs from a server into the OpenSearch Cluster Database system. Specifically:
6+
7+
* [Initialize an OpenSearch Cluster](khoi-tao-mot-opensearch-cluster.md)
8+
* [Access and work on OpenSearch Dashboard](truy-cap-va-lam-viec-tren-opensearch-dashboard.md)
9+
* [Push logs from server into an initialized OpenSearch Cluster](day-du-lieu-hoac-logs-tu-server-vao-mot-opensearch-cluster-da-khoi-tao.md)
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# Push data or event logs from Logstash into an initialized OpenSearch Cluster
2+
3+
## Prerequisites
4+
5+
Suppose you have successfully initialized an OpenSearch Cluster with the following parameters:&#x20;
6+
7+
<figure><img src="../../../.gitbook/assets/opensearch5.png" alt=""><figcaption></figcaption></figure>
8+
9+
Next, proceed to push sample data into OpenSearch Dashboards or push event logs from Logstash into OpenSearch.
10+
11+
## **Push sample data into OpenSearch Dashboards**
12+
13+
Sample data will help you get familiar with OpenSearch Dashboards and test data visualization capabilities.
14+
15+
#### **Step 1: Download sample data**
16+
17+
Run the following command to download sample data:
18+
19+
```bash
20+
curl -O https://raw.githubusercontent.com/opensearch-project/documentation-website/2.19/assets/examples/ecommerce-field_mappings.json
21+
curl -O https://raw.githubusercontent.com/opensearch-project/documentation-website/2.19/assets/examples/ecommerce.ndjson
22+
```
23+
24+
#### **Step 2: Create index and push data into OpenSearch**
25+
26+
Run the following command to create an index and push data to OpenSearch:
27+
28+
```bash
29+
# 2. Create index and data.
30+
curl -H "Content-Type: application/json" -X PUT "https://<<OpenSearch_ReceiveLogs_Endpoint>>/ecommerce" -k -H "Authorization: Basic $(echo -n 'master-user:<<Master_User_Password>>' | base64)" --data-binary "@ecommerce-field_mappings.json"
31+
curl -H "Content-Type: application/json" -X PUT "https://<<OpenSearch_ReceiveLogs_Endpoint>>/ecommerce/_bulk" -k -H "Authorization: Basic $(echo -n 'master-user:<<Master_User_Password>>' | base64)" --data-binary "@ecommerce.ndjson"
32+
```
33+
34+
You can get the `OpenSearch_ReceiveLogs_Endpoint` information from the vDB Portal and replace `<<Master_User_Password>>` with the master account password you previously created.
35+
36+
Example:&#x20;
37+
38+
```bash
39+
# 2. Create index and data.
40+
curl -H "Content-Type: application/json" -X PUT "https://open-search-dem-53461-5cfxl-hcm03.vdb-opensearch.vngcloud.vn:9200/ecommerce" -k -H "Authorization: Basic $(echo -n 'master-user:123456789aA@' | base64)" --data-binary "@ecommerce-field_mappings.json"
41+
curl -H "Content-Type: application/json" -X PUT "https://open-search-dem-53461-5cfxl-hcm03.vdb-opensearch.vngcloud.vn:9200/ecommerce/_bulk" -k -H "Authorization: Basic $(echo -n 'master-user:123456789aA@' | base64)" --data-binary "@ecommerce.ndjson"
42+
```
43+
44+
[\
45+
](https://liemnt5-cidr-11430-2ue3z-hcm03.vdb-opensearch.vngcloud.tech)The result will display as follows:&#x20;
46+
47+
```bash
48+
curl -H "Content-Type: application/json" -X PUT "https://open-search-dem-53461-5cfxl-hcm03.vdb-opensearch.vngcloud.vn:9200/ecommerce" -k -H "Authorization: Basic $(echo -n 'master-user:123456789aA@' | base64)" --data-binary "@ecommerce-field_mappings.json"
49+
{"acknowledged":true,"shards_acknowledged":true,"index":"ecommerce"}
50+
51+
curl -H "Content-Type: application/json" -X PUT "https://open-search-dem-53461-5cfxl-hcm03.vdb-opensearch.vngcloud.vn:9200/ecommerce/_bulk" -k -H "Authorization: Basic $(echo -n 'master-user:123456789aA@' | base64)" --data-binary "@ecommerce.ndjson"
52+
{"took":4579,"errors":false,"items":[{"index":{"_index":"ecommerce","_id":"0","_version":1,"result":"created","_shards":{"total":2,"successful":2,"failed":0},"_seq_no":0,"_primary_term":1,"status":201}},{"index":{"_index":"ecommerce","_id":"1","_version":1,"result":"created","_shards":{"total":2,"successful":2,"failed":0},"_seq_no":1,"_primary_term":1,"status":201}},{"index":{"_index":"ecommerce","_id":"2","_version":1,"result":"created","_shards":{"total":2,"successful":2,"failed":0},"_seq_no":2,"_primary_term":1,"status":201}},{"index":{"_index":"ecommerce","_id":"3","_version":1,"result":"created","_shards":{"total":2,"successful":2,"failed":0},"_seq_no":3,"_primary_term":1,"status":201}},{"index":{"_index":"ecommerce","_id":"4","_version":1,"result":"created","_shards":{"total":2,"successful":2,"failed":0},"_seq_no":4,"_primary_term":1,"status":201}},{"index":{"_index":"ecommerce","_id":"5","_version":1,"result":"created","_shards":{"total":2,"successful":2,"failed":0},"_seq_no":5,"_primary_term":1,"status":201}},{"index":{"_index":"ecommerce","_id":"6","_version":1,"result":"created","_shards":{"total":2,"successful":2,"failed":0},"_seq_no":6,"_primary_term":1,"status":201}},{"index":{"_index":"ecommerce","_id":"7","_version":1,"result":"created","_shards":{"total":2,"successful":2,"failed":0},"_seq_no":7,"_primary_term":1,"status":201}},{"index":{"_index":"ecommerce","_id":"8","_version":1,"result":"created","_shards":{"total":2,"successful":2,"failed":0},"_seq_no":8,"_primary_term":1,"status":2...
53+
....
54+
```
55+
56+
**Step 3: Check data on OpenSearch Dashboards**
57+
58+
1. Access and log in to **OpenSearch Dashboards**
59+
2. Go to **Management**, select **Dashboard Management**&#x20;
60+
61+
<figure><img src="../../../.gitbook/assets/image (7) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
62+
63+
3. Select **Index patterns**, then select **Create index pattern**
64+
65+
<figure><img src="../../../.gitbook/assets/image (8) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
66+
67+
4. Enter **Index pattern name**, for example `ecommerce*` then select **Next step**
68+
69+
<figure><img src="../../../.gitbook/assets/image (5) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
70+
71+
5. Access **Discover** to view the sample data.
72+
73+
<figure><img src="../../../.gitbook/assets/image (6) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
74+
75+
## **Push event logs from Logstash into OpenSearch**
76+
77+
If you want to collect and push event logs from Logstash into OpenSearch, follow these steps:
78+
79+
#### **Step 1: Install Logstash (if not already installed)**
80+
81+
On Ubuntu/Debian:
82+
83+
```bash
84+
sudo apt update && sudo apt install logstash
85+
```
86+
87+
On CentOS/RHEL:
88+
89+
```bash
90+
sudo yum install logstash
91+
```
92+
93+
#### **Step 2: Configure Logstash to send logs to OpenSearch**
94+
95+
Create a configuration file for Logstash, for example:
96+
97+
```bash
98+
sudo nano /etc/logstash/conf.d/logstash.conf
99+
```
100+
101+
Add the following content:
102+
103+
```editorconfig
104+
input {
105+
file {
106+
path => "/var/log/syslog"
107+
start_position => "beginning"
108+
sincedb_path => "/dev/null"
109+
}
110+
}
111+
112+
filter {
113+
mutate {
114+
add_field => { "host" => "%{host}" }
115+
}
116+
}
117+
118+
output {
119+
opensearch {
120+
hosts => ["OpenSearch_ReceiveLogs_Endpoint"]
121+
index => "logstash-logs"
122+
user => "master-user"
123+
password => "Your_MasterUser_Password"
124+
ssl => false
125+
}
126+
}
127+
```
128+
129+
Replace:
130+
131+
* `OpenSearch_ReceiveLogs_Endpoint` with your OpenSearch Receive Logs Endpoint from the vDB Portal.
132+
* `Your_MasterUser_Password` with the master account password you previously created.
133+
134+
#### **Step 3: Start Logstash**
135+
136+
After configuration is complete, start Logstash to begin sending logs:
137+
138+
```bash
139+
sudo systemctl start logstash
140+
```
141+
142+
#### **Step 4: Check data in OpenSearch**
143+
144+
You can check logs using the OpenSearch API:
145+
146+
```bash
147+
curl -X GET "https://OpenSearch_ReceiveLogs_Endpoint/logstash-logs/_search?pretty" -k -H "Authorization: Basic $(echo -n 'master-user:Your_MasterUser_Password' | base64)"
148+
```
149+
150+
Example:
151+
152+
```bash
153+
curl -X GET "https://open-search-dem-53461-5cfxl-hcm03.vdb-opensearch.vngcloud.vn:9200/logstash-logs/_search?pretty" -k -H "Authorization: Basic $(echo -n 'master-user:123456789aA@' | base64)"
154+
```
155+
156+
If logs appear, it means Logstash has successfully sent data to OpenSearch.
157+
158+
#### **Step 5: View logs on OpenSearch Dashboards**
159+
160+
1. Access and log in to **OpenSearch Dashboards**
161+
2. Go to **Management**, select **Dashboard Management**&#x20;
162+
163+
<figure><img src="../../../.gitbook/assets/image (7) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
164+
165+
3. Select **Index patterns**, then select **Create index pattern**
166+
167+
<figure><img src="../../../.gitbook/assets/image (8) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
168+
169+
4. Enter **Index pattern name**, for example `logstash-logs*` then select **Next step**
170+
171+
<figure><img src="../../../.gitbook/assets/image (9) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
172+
173+
5. Finally, access **Discover** to view the logs.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Initialize an OpenSearch Cluster
2+
3+
To initialize an OpenSearch Cluster Database on the vDB system, you can follow these steps:
4+
5+
**Step 1:** Access [https://vdb.console.vngcloud.vn/](https://vdb.console.vngcloud.vn/)
6+
7+
**Step 2:** Select **Cluster** under the **OpenSearch** section, then select **Create a cluster..**
8+
9+
**Step 3:** On the OpenSearch Cluster initialization screen, you need to enter/select:
10+
11+
* **Basic configuration:**
12+
* **OpenSearch Cluster name:** a memorable name for the cluster. The cluster name must be between 5 and 50 characters long and can include characters a-z, A-Z, 0-9, '-'.
13+
* **Tag:** you can add tags to mark clusters according to your needs.
14+
15+
<figure><img src="../../../.gitbook/assets/image (952).png" alt=""><figcaption></figcaption></figure>
16+
17+
* **Cluster specification**
18+
* **OpenSearch Version:** select the OpenSearch Cluster version you want to use. Currently we are supporting 2 versions v2.15 and v2.17
19+
* **Instance**: select the CPU type and corresponding package you want to configure for all VMs (nodes) in each cluster.
20+
* **Number of nodes:** select the number of nodes (VMs) you want to use for the cluster. Currently we are providing options for 3, 5, 7, 9 nodes. If you want to create a cluster with more than 9 nodes, please contact GreenNode so we can assist you.&#x20;
21+
* **Encryption volume:** select whether or not to use the encryption service for volumes used on the cluster. If you choose to use this option, you need to pay additional costs for encryption.&#x20;
22+
* **Storage type:** select the disk type and IOPS you want to use.
23+
* **Storage size:** select the corresponding disk size.
24+
25+
<figure><img src="../../../.gitbook/assets/image (953).png" alt=""><figcaption></figcaption></figure>
26+
27+
<figure><img src="../../../.gitbook/assets/image (954).png" alt=""><figcaption></figcaption></figure>
28+
29+
* **Network settings:**
30+
* **VPC:** select a VPC you want to use. The selected VPC is the IP address range that the Cluster nodes will use to communicate.
31+
* **Subnet:** select a Subnet within the VPC you have selected. This is a smaller IP address range belonging to the VPC. Each node in the Cluster will be assigned an IP from this Subnet.
32+
* **Public Allow CIDRs:** enter the CIDR you allow to access the OpenSearch Dashboard and push logs to OpenSearch Received Logs.
33+
34+
<figure><img src="../../../.gitbook/assets/image (955).png" alt=""><figcaption></figcaption></figure>
35+
36+
* **Access control methods:**
37+
* **Master user password:** the system will automatically create the username `master-user`, you need to enter the master user password and remember to use this account to access the OpenSearch Dashboard as well as push logs to Received log.
38+
39+
<figure><img src="../../../.gitbook/assets/image (956).png" alt=""><figcaption></figcaption></figure>
40+
41+
* **Cluster options:**
42+
* **Configuration group**: by default, for each OpenSearch version, we will create a **Default Configuration Group**. You will not be able to change the parameters in this Default Configuration Group. If you want to change the default parameters, please create a new Configuration Group and edit it according to your needs.
43+
44+
<figure><img src="../../../.gitbook/assets/image (957).png" alt=""><figcaption></figcaption></figure>
45+
46+
* **Plugins**
47+
* **Plugin:** currently, vDB has automatically installed popular plugins in your OpenSearch Cluster under the **Bundled Plugins** section, for example kNN. You can refer to the list of default available plugins [here](../cac-tinh-nang-cua-opensearch-cluster/lam-viec-voi-plugin.md). Additionally, you can also choose to install additional plugins by selecting plugins under the **Additional Plugins** section. Refer to the list of plugins available for installation [here](../cac-tinh-nang-cua-opensearch-cluster/lam-viec-voi-plugin.md).
48+
49+
<figure><img src="../../../.gitbook/assets/image (958).png" alt=""><figcaption></figcaption></figure>
50+
51+
**Step 5:** Select **Create Cluster.**
52+
53+
**Step 6:** Complete the payment steps if you are a prepaid user.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Access and Work on OpenSearch Dashboard
2+
3+
After an OpenSearch Cluster has been initialized, you can access the OpenSearch Dashboard to **add data, use analytics tools, execute queries, create dashboards, manage indexes, manage users**...The detailed steps are as follows:
4+
5+
## Access OpenSearch Dashboard
6+
7+
**Step 1:** On the screen containing the list of OpenSearch Clusters, select the OpenSearch Cluster you want to access.
8+
9+
**Step 2:** On the cluster detail screen, select **Connectivity & Security**
10+
11+
**Step 3**: Under the **Accessibility** section, retrieve the **Dashboard Endpoint** information
12+
13+
<figure><img src="../../../.gitbook/assets/opensearch1.png" alt=""><figcaption></figcaption></figure>
14+
15+
16+
17+
**Step 4**: Open this URL and log in with:
18+
19+
* **Username**: `master-user`
20+
* **Password**: the **Master user password** you entered when initializing the Cluster
21+
22+
<figure><img src="../../../.gitbook/assets/opensearch2.png" alt=""><figcaption></figcaption></figure>
23+
24+
<figure><img src="../../../.gitbook/assets/opensearch3.png" alt=""><figcaption></figcaption></figure>
25+
26+
After successful login, you can now work with the OpenSearch Cluster through the OpenSearch Dashboard. Refer to the sections below for guidance on performing some main tasks on the OpenSearch Dashboard.
27+
28+
<figure><img src="../../../.gitbook/assets/opensearch4.png" alt=""><figcaption></figcaption></figure>
29+
30+
***
31+
32+
## Working with OpenSearch Dashboard
33+
34+
### Adding data
35+
36+
{% embed url="https://opensearch.org/docs/latest/dashboards/quickstart/#adding-sample-data" %}
37+
38+
### Using analytics tools
39+
40+
{% embed url="https://opensearch.org/docs/latest/dashboards/discover/index-discover/" %}
41+
42+
### Executing queries
43+
44+
{% embed url="https://opensearch.org/docs/latest/dashboards/query-workbench/" %}
45+
46+
### Creating Dashboard
47+
48+
{% embed url="https://opensearch.org/docs/latest/dashboards/dashboard/index/" %}
49+
50+
### Managing indexes
51+
52+
{% embed url="https://opensearch.org/docs/latest/dashboards/im-dashboards/index/" %}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# OpenSearch Cluster Features
2+
3+
On the vDB OpenSearch system, you can perform:
4+
5+
* [Initialize OpenSearch Cluster](khoi-tao-opensearch-cluster.md)
6+
* [Edit OpenSearch Cluster](chinh-sua-opensearch-cluster/)
7+
* [Manage access to OpenSearch Cluster](quan-ly-truy-cap-toi-opensearch-cluster.md)
8+
* [Work with Configuration Group](lam-viec-voi-configuration-group.md)
9+
* [Work with Plugin](lam-viec-voi-plugin.md)
10+
* [Delete OpenSearch Cluster](xoa-opensearch-cluster.md)
11+
12+
For details, please refer to the detailed guide on the following pages.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Edit OpenSearch Cluster
2+
3+
On each OpenSearch Cluster, you can edit certain parameters, specifically:
4+
5+
* [Increase number of nodes](tang-so-luong-node.md)
6+
* [Change node IOPS parameters](thay-doi-thong-so-iops-cua-node.md)
7+
* [Resize node disk size](tang-giam-kich-thuoc-o-dia-cua-node.md)
8+
* [Change master account password](thay-doi-mat-khau-tai-khoan-master.md)
9+
10+
For detailed steps, please refer to the sections below.

0 commit comments

Comments
 (0)