用kibana consle 替代sense

来源:互联网 发布:中国房产数据 编辑:程序博客网 时间:2024/06/05 16:34

elasticsearch的dsl开发工具sense被google下架了,kibana console是很好的替代品。但是,我们的es集群前些日子因为应付安全检查改为https+basic auth方式(详细配置过程见本人博文:http://blog.csdn.net/jiashiwen/article/details/76914374),kibana需要进行若干配置才能工作。


1.下载与elasticsearch版本号一致的kibana安装包,笔者目前开发环境5.5.2,对应kibana版本也为5.5.2(最新的5.6版本会报不兼容错误,不能运行)。


2.配置config/kibana.yml文件,主要配置项如下

  1. # The URL of the Elasticsearch instance to use for all your queries.
  2. #elasticsearch.url: "http://localhost:9200"
  3. elasticsearch.url: "https://192.168.1.1:9281/"
  4. # If your Elasticsearch is protected with basic authentication, these settings provide
  5. # the username and password that the Kibana server uses to perform maintenance on the Kibana
  6. # index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
  7. # is proxied through the Kibana server.
  8. #elasticsearch.username: "user"
  9. #elasticsearch.password: "pass"
  10. elasticsearch.username: "admin"
  11. elasticsearch.password: "admin"
  12. # Optional settings that provide the paths to the PEM-format SSL certificate and key files.
  13. # These files validate that your Elasticsearch backend uses the same key files.
  14. #elasticsearch.ssl.certificate: /path/to/your/client.crt
  15. #elasticsearch.ssl.key: /path/to/your/client.key
  16. elasticsearch.ssl.certificate: /home/develop/kibana-5.6.3-linux-x86_64/config/crts/eshttp.crt
  17. elasticsearch.ssl.key: /home/develop/kibana-5.6.3-linux-x86_64/config/crts/eshttp.key
  18. # To disregard the validity of SSL certificates, change this setting's value to 'none'.
  19. #elasticsearch.ssl.verificationMode: full
  20. elasticsearch.ssl.verificationMode: none

各项配置看文件内说明,写的很清楚,这里就不翻译了,其中最重要的是这两样elasticsearch.ssl.certificate和elasticsearch.ssl.key,一定要与服务端保持一致。由于证书是自己生成的,校验项elasticsearch.ssl.verificationMode的值需要改为none。


启动kibana后,通过http://localhose:5601访问即可


原创粉丝点击