curl -XPOST localhost:9200/_plugins/_performanceanalyzer/cluster/config -H 'Content-Type: application/json' -d '{"enabled": true}'
# 确保配置目录存在
mkdir -p /usr/share/opensearch/config/opensearch-performance-analyzer
# 1. 创建性能分析器配置文件,并强制设置绑定为 0.0.0.0
echo "webservice-bind-host = 0.0.0.0" > /usr/share/opensearch/config/opensearch-performance-analyzer/performance-analyzer.properties
# 2. 创建日志中提示缺失的元数据文件
touch /usr/share/opensearch/config/opensearch-performance-analyzer/plugin-stats-metadata
# 3. 检查并确保 /dev/shm/performanceanalyzer/ 存在
mkdir -p /dev/shm/performanceanalyzer/