kibana数据可视化
生活随笔
收集整理的這篇文章主要介紹了
kibana数据可视化
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
kibana簡介
Kibana 核心產品搭載了一批經典功能:柱狀圖、線狀圖、餅圖、旭日圖,等等。
將地理數據融入任何地圖
精選的時序性 UI,對您Elasticsearch 中的數據執行高級時間序列分析。
利用 Graph 功能分析數據間的關系
Kibana 開發工具為開發人員提供了多種強大方法來幫助其與Elastic Stack 進行交互。
kibana安裝與配置
kibana下載
https://elasticsearch.cn/download/
kibana配置:
[root@server5 ~]# rpm -ivh kibana-7.6.1-x86_64.rpm [root@server5 kibana]# vim kibana.yml [root@server5 kibana]# systemctl start kibana.service [root@server5 kibana]# netstat -antlp| grep :5601
訪問kibana 172.25.3.5:5601
創建索引匹配
注意時間范圍的選擇
基于ES索引創建可視化
生成訪問量可視化
創建折線圖
儀表盤實時檢測訪問
保證數據采集打開,可以在其他主機進行壓測
[root@server5 conf.d]# logstash -f apache.conf [root@zhenji Desktop]# ab -c1 -n100 http://172.25.3.5/index.html輕量級數據采集(filebeat)
實驗環境,給server4安裝httpd
[root@server4 ~]# yum install httpd -y [root@server4 ~]# systemctl start httpd [root@server4 ~]# cd /var/www/html/ [root@server4 html]# echo server4 > index.html [root@server4 html]# chmod 755 /var/log/httpd/下載安裝配置filebeat
get filebeat-7.6.1-x86_64.rpm [root@server4 ~]# rpm -ivh filebeat-7.6.1-x86_64.rpm [root@server4 ~]# cd /etc/filebeat/ [root@server4 filebeat]# vim filebeat.yml [root@server4 filebeat]# systemctl start filebeat.service
效果展示
多索引
為了可以看到效果,在其他節點也安裝
這樣做,將根據主機名將索引分離開來。
output.logstash模式
[root@server1 filebeat]# vim filebeat.yml [root@server1 filebeat]# systemctl restart filebeat.service [root@server5 conf.d]# vim apache.conf input {beats {port => 5044 }#file {#path => "/var/log/httpd/access_log"#start_position => "beginning"#}#syslog {} }filter{grok {match => {"message" => "%{HTTPD_COMBINEDLOG}"} } } output {#file {# path => "/tmp/logstash.txt"# codec => line { format => "custom format: %{message}"} #}elasticsearch {hosts => ["172.25.3.1:9200"]index => "apachelogsss-%{+yyyy.MM.dd}"}stdout { } } [root@server5 conf.d]# logstash -f apache.conf啟用xpack安全驗證
集群模式需要先創建證書:
# cd /usr/share/elasticsearch/ # bin/elasticsearch-certutil ca # bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12 # cp elastic-certificates.p12 elastic-stack-ca.p12 /etc/elasticsearch # cd /etc/elasticsearch # chown elasticsearch elastic-certificates.p12 elastic-stack-ca.p12配置所有的elasticsearch集群節點:
# vim /etc/elasticsearch/elasticsearch.yml xpack.security.enabled: true xpack.security.transport.ssl.enabled: true xpack.security.transport.ssl.verification_mode: certificate xpack.security.transport.ssl.keystore.path: /etc/elasticsearch/elastic- certificates.p12 xpack.security.transport.ssl.truststore.path: /etc/elasticsearch/elastic- certificates.p12ES集群重啟正常后,設置用戶密碼:
設置kibana連接ES的用戶密碼:
# vim /etc/kibana/kibana.yml elasticsearch.username: "kibana" elasticsearch.password: "westos"
設置Logstash連接ES用戶密碼:
head訪問:
? http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type //添加參數到es配置
? http://172.25.0.13:9100/?auth_user=elastic&auth_password=westos
總結
以上是生活随笔為你收集整理的kibana数据可视化的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: logstash数据采集
- 下一篇: Django入门(二) 理解Django