Elastic集群监控工具的安装
HEAD插件安装
elasticsearch-head 是用于监控Elasticsearch状态的客户端插件,包括数据可视化、执行增删改查操作等
安装步骤
1.先安装Nodejs
2.下载head源码
https://github.com/mobz/elasticsearch-head
3.安装依赖模块
npm install
4.启动服务
npm run start
HEAD使用步骤
1.使用HEAD连接es集群的时候,es集群服务端默认不接受跨域请求,需要先修改es的配置文件然后重启服务
修改elasticsearch所在目录中 config/elasticsearch.yml
# 是否支持跨域
http.cors.enabled: true
# *表示支持所有域名
http.cors.allow-origin: "*"
2.401验证权限失败
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: "*"
https://192.168.30.129:9200/?auth_user=elastic&auth_password=admin
node.name: node1 network.host: 192.168.30.129 discovery.seed_hosts: [ "192.168.30.129" ] cluster.initial_master_nodes: [ "node1" ] xpack.license.self_generated.type: basic xpack.security.enabled: true xpack.security.http.ssl.enabled: true xpack.security.http.ssl.key: /data1/taishi/elasticsearch/instance/instance.key xpack.security.http.ssl.certificate: /data1/taishi/elasticsearch/instance/instance.crt xpack.security.http.ssl.certificate_authorities: /data1/taishi/elasticsearch/ca/ca.crt xpack.security.transport.ssl.enabled: true xpack.security.transport.ssl.verification_mode: certificate xpack.security.transport.ssl.key: /data1/taishi/elasticsearch/instance/instance.key xpack.security.transport.ssl.certificate: /data1/taishi/elasticsearch/instance/instance.crt xpack.security.transport.ssl.certificate_authorities: /data1/taishi/elasticsearch/ca/ca.crt path.repo: ["/home/admin/es_backup"] http.cors.enabled: true http.cors.allow-origin: "*" http.cors.allow-headers: "*"
证书不可信错误
https://192.168.0.123:9200/?auth_user=elastic&auth_password=admin
本文来自博客园,作者:不懂123,转载请注明原文链接:https://www.cnblogs.com/yxh168/p/16850363.html