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 控制面板(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 端口转发安全地远程访问 OpenSearch,无需暴露端口
9200. - SSH 端口转发示例:
ssh -L 9200:localhost:9200 root@<SERVER_IP> - OpenSearch Dashboards 已配置为监听
0.0.0.0并可通过端口进行远程访问5601. - Dashboards 认证凭据定义于
/etc/opensearch-dashboards/opensearch_dashboards.yml.