kibana数据可视化
kibana簡(jiǎn)介
Kibana 核心產(chǎn)品搭載了一批經(jīng)典功能:柱狀圖、線狀圖、餅圖、旭日?qǐng)D,等等。
將地理數(shù)據(jù)融入任何地圖
精選的時(shí)序性 UI,對(duì)您Elasticsearch 中的數(shù)據(jù)執(zhí)行高級(jí)時(shí)間序列分析。
利用 Graph 功能分析數(shù)據(jù)間的關(guān)系
Kibana 開發(fā)工具為開發(fā)人員提供了多種強(qiáng)大方法來(lái)幫助其與Elastic Stack 進(jìn)行交互。
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
訪問(wèn)kibana 172.25.3.5:5601
創(chuàng)建索引匹配
注意時(shí)間范圍的選擇
基于ES索引創(chuàng)建可視化
生成訪問(wèn)量可視化
創(chuàng)建折線圖
儀表盤實(shí)時(shí)檢測(cè)訪問(wèn)
保證數(shù)據(jù)采集打開,可以在其他主機(jī)進(jìn)行壓測(cè)
[root@server5 conf.d]# logstash -f apache.conf [root@zhenji Desktop]# ab -c1 -n100 http://172.25.3.5/index.html輕量級(jí)數(shù)據(jù)采集(filebeat)
實(shí)驗(yàn)環(huán)境,給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
效果展示
多索引
為了可以看到效果,在其他節(jié)點(diǎn)也安裝
這樣做,將根據(jù)主機(jī)名將索引分離開來(lái)。
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安全驗(yàn)證
集群模式需要先創(chuàng)建證書:
# 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集群節(jié)點(diǎn):
# 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集群重啟正常后,設(shè)置用戶密碼:
設(shè)置kibana連接ES的用戶密碼:
# vim /etc/kibana/kibana.yml elasticsearch.username: "kibana" elasticsearch.password: "westos"
設(shè)置Logstash連接ES用戶密碼:
head訪問(wèn):
? http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type //添加參數(shù)到es配置
? http://172.25.0.13:9100/?auth_user=elastic&auth_password=westos
總結(jié)
以上是生活随笔為你收集整理的kibana数据可视化的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: logstash数据采集
- 下一篇: Django入门(二) 理解Django