Accessing OpenSearch
- URL:
https://localhost:9200 - ข้อมูลล็อกอินของผู้ดูแลระบบ: เก็บไว้ใน
/root/.cloudzy-creds - โดยค่าเริ่มต้น OpenSearch จะผูกกับ
localhost(127.0.0.1) และไม่สามารถเข้าถึงได้ผ่าน IP ของเซิร์ฟเวอร์ - ตัวอย่างการทดสอบด้วย curl:
curl -X GET https://localhost:9200 -u 'admin:<password>' --insecure
การเข้าถึง OpenSearch Dashboards (UI)
- URL:
http://<SERVER_IP>:5601 - ข้อมูลล็อกอิน: เก็บไว้ใน
/root/.cloudzy-creds - Dashboards ถูกตั้งค่าให้รับฟังที่
0.0.0.0สำหรับการเข้าถึงจากระยะไกล
ไฟล์และไดเรกทอรีสำคัญ
- Credentials:
/root/.cloudzy-creds - OpenSearch configuration:
/etc/opensearch/opensearch.yml - OpenSearch data:
/var/lib/opensearch - OpenSearch logs:
/var/log/opensearch - Dashboards configuration:
/etc/opensearch-dashboards/opensearch_dashboards.yml - Dashboards logs:
/var/log/opensearch-dashboards
Service Management
OpenSearch:
systemctl status opensearch
systemctl restart opensearch
journalctl -u opensearch -f
OpenSearch Dashboards:
systemctl status opensearch-dashboards
systemctl restart opensearch-dashboards
journalctl -u opensearch-dashboards -f
Notes
- OpenSearch listens on
localhost (127.0.0.1)ตามค่าเริ่มต้น และไม่สามารถเข้าถึงผ่าน IP ของเซิร์ฟเวอร์ได้ หากไม่ได้กำหนดค่าไว้อย่างชัดเจน - สามารถใช้ SSH port forwarding เพื่อเข้าถึง OpenSearch จากระยะไกลได้อย่างปลอดภัย โดยไม่ต้องเปิดพอร์ต
9200. - ตัวอย่าง SSH port forwarding:
ssh -L 9200:localhost:9200 root@<SERVER_IP> - OpenSearch Dashboards ถูกตั้งค่าให้รับฟังที่
0.0.0.0และเข้าถึงได้จากระยะไกลที่พอร์ต5601. - ข้อมูล authentication ของ Dashboards กำหนดไว้ใน
/etc/opensearch-dashboards/opensearch_dashboards.yml.