- docker拉取镜像
docker pull kibana
- 创建配置文件
kibana.yml
#elasticsearch.requestTimeout: 30000
# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
# headers, set this value to [] (an empty list).
#elasticsearch.requestHeadersWhitelist: [ authorization ]
# Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten
# by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.
#elasticsearch.customHeaders: {}
# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
#elasticsearch.shardTimeout: 0
# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.
#elasticsearch.startupTimeout: 5000
# Specifies the path where Kibana creates the process ID file.
#pid.file: /var/run/kibana.pid
# Enables you specify a file where Kibana stores log output.
#logging.dest: stdout
# Set the value of this setting to true to suppress all logging output.
#logging.silent: false
# Set the value of this setting to true to suppress all logging output other than error messages.
#logging.quiet: false
# Set the value of this setting to true to log all events, including system usage information
# and all requests.
#logging.verbose: false
# Set the interval in milliseconds to sample system and process performance
# metrics. Minimum is 100ms. Defaults to 5000.
#ops.interval: 5000
# The default locale. This locale can be used in certain circumstances to substitute any missing
# translations.
#i18n.defaultLocale: "en"
elasticsearch.url: "http://192.168.47.129:9201" ##用于连接es的地址
#xpack.monitoring.ui.container.elasticsearch.enabled: true
生产环境中的kibana多了权限控制,使用X-Pack安全模块,可参考官方文档配置。
更多的配置文件设置,请参考官方文档:https://www.elastic.co/guide/cn/kibana/current/settings.html
- docker启动脚本
#!/bin/bash
docker run -d --name kibana \
-p 5601:5601 \
-v /root/kibana/config/kibana.yml:/etc/kibana/kibana.yml \ ##挂载配置文件
kibana:latest
- 验证
http://192.168.47.128:5601