在kibana中查看nginx日志的Discover,Dashboards


官方的操作:
1.安裝filebeat,配置filebeat獲取nginx日志,來源有兩種:
第一種是使用自帶的模塊進行收集,在modules.d目錄中啟用模塊配置,運行Filebeat時啟用模塊,在filebeat.yml文件中啟用模塊配置
第二種是在filebeat.yml中寫input日志所在路徑等

2.配置kibana
setup.kibana:
host: "localhost:5601"

3.p配置elasticsearch
output.elasticsearch:
hosts: ["localhost:9200"]

4.開啟kiabna中的儀表盤
filebeat setup --dashboards

5.在kiabna中左側導航找到可視化,儀表盤等進行后續操作

官方形式:flebeat->elasticsearch

問題:
1.若使用形式是filebeat->logstash->elasticsearch,是否還能使用?
解答:不能使用,因為采用這種形式的話,日志可以收集,但是在操作上述第4步的時候會報錯:Exiting: Index management requested but the Elasticsearch output is not configured/enabled
也就是說必須要在filebeat.yml文件中配置上out.put是elasticsearch,而不是out.put到logstash

2.若kibana訪問開啟ssl,要如何配置?
官方文檔說明,地址:https://www.elastic.co/guide/en/beats/filebeat/current/configuration-ssl.html

setup.kibana.host: "https://192.0.2.255:5601"
setup.kibana.ssl.enabled: true
setup.kibana.ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
setup.kibana.ssl.certificate: "/etc/pki/client/cert.pem"
setup.kibana.ssl.key: "/etc/pki/client/cert.key"
  1. elasticsearch開始ssl,要如何配置?
    官方文檔說明,地址:https://www.elastic.co/guide/en/beats/filebeat/current/configuration-ssl.html
output.elasticsearch.hosts: ["https://192.168.1.42:9200"]
output.elasticsearch.ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
output.elasticsearch.ssl.certificate: "/etc/pki/client/cert.pem"
output.elasticsearch.ssl.key: "/etc/pki/client/cert.key"

想實現的效果:
1.流程:filebeat->logtash->elasticsearch-.kibana,且每個環節均開啟ssl
2.在kibana中查看到nginx 日志的Discover可視化,關鍵是需要setup操作開啟自帶模塊


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM