全球主机交流论坛

标题: Kibana的搭建与配置 [打印本页]

作者: 土小帽    时间: 2023-11-3 22:06
标题: Kibana的搭建与配置
Kibana是一个开源的分析与可视化平台,设计出来用于和Elasticsearch一起使用的。你可以用kibana搜索、查看、交互存放在Elasticsearch索引里的数据,使用各种不同的图表、表格、地图等kibana能够很轻易地展示高级数据分析与可视化。

注意:kibana和Elasticsearch的版本要一致,否则会有问题

下载与解压
wget https://artifacts.elastic.co/downloads/kibana/kibana-6.6.1-linux-x86_64.tar.gz  
tar -xvf kibana-6.6.1-linux-x86_64.tar.gz  
mv kibana-6.6.1-linux-x86_64 /usr/local/kibana  
修改配置文件
/usr/local/kibana/config/kibana.yml

# Kibana is served by a back end server. This setting specifies the port to use.  
server.port: 5601 #监听端口  
# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.  
# The default is 'localhost', which usually means remote machines will not be able to connect.  
# To allow connections from remote users, set this parameter to a non-loopback address.  
server.host: "0.0.0.0" #服务ip  
# Enables you to specify a path to mount Kibana at if you are running behind a proxy. This only affects  
# the URLs generated by Kibana, your proxy is expected to remove the basePath value before forwarding requests  
# to Kibana. This setting cannot end in a slash.  
#server.basePath: ""  
# The maximum payload size in bytes for incoming server requests.  
#server.maxPayloadBytes: 1048576  
# The Kibana server's name.  This is used for display purposes.  
#server.name: "your-hostname"  
# The URL of the Elasticsearch instance to use for all your queries.  
elasticsearch.url: "http://10.1.1.1:9200" #elasticsearch集群中其中IP  
# When this setting's value is true Kibana uses the hostname specified in the server.host  
# setting. When the value of this setting is false, Kibana uses the hostname of the host  
# that connects to this Kibana instance.  
elasticsearch.preserveHost: true  
# Kibana uses an index in Elasticsearch to store saved searches, visualizations and  
# dashboards. Kibana creates a new index if the index doesn't already exist.  
kibana.index: ".kibana"  
# The default application to load.  
kibana.defaultAppId: "discover"  
......  
启动脚本
保存文件/lib/systemd/system/kibana.service

[Unit]  
Description=Kibana  
After=network.target  
  
[Service]  
ExecStart=/workspace/kibana/bin/kibana  
Type=simple  
PIDFile=/var/run/kibana.pid  
Restart=always  
  
[Install]  
WantedBy=default.target  
systemctl enable kibana #开机自启动  
systemctl start kibana #启动kibana  




欢迎光临 全球主机交流论坛 (https://loc.442266.xyz/) Powered by Discuz! X3.4