页面树结构

2017-11-09 ApacheCN 开源组织,第二期邀请成员活动,一起走的更远 : http://www.apachecn.org/member/209.html


MachineLearning 优酷地址 : http://i.youku.com/apachecn

转至元数据结尾
转至元数据起始

针对 Kibana 的配置 Docker 镜像提供了几种配置方法。最常见的方法是像在 配置 Kibana 中描述的 kibana.yml 文件一样,然而也提供了相应的环境变量来定义配置。

Bind-mounted 配置

Docker 上配置 Kibana 的一种方式是通过 bind-mounting 来提供一个 kibana.yml 文件。与 docker-compse 一样,这个 bind-mount 可以指定成下面这样 : 

services:
  kibana:
    image: docker.elastic.co/kibana/kibana:5.2.2
    volumes:
      - ./kibana.yml:/usr/share/kibana/config/kibana.yml

环境变量配置

Docker 中,Kibana 也可以通过环境变量来配置。下列映射是可用的 : 

表 2. Docker 环境变量

环境变量

Kibana 配置

ELASTICSEARCH_CUSTOMHEADERS

elasticsearch.customHeaders

ELASTICSEARCH_PASSWORD

elasticsearch.password

ELASTICSEARCH_PINGTIMEOUT

elasticsearch.pingTimeout

ELASTICSEARCH_PRESERVEHOST

elasticsearch.preserveHost

ELASTICSEARCH_REQUESTHEADERSWHITELIST

elasticsearch.requestHeadersWhitelist

ELASTICSEARCH_REQUESTTIMEOUT

elasticsearch.requestTimeout

ELASTICSEARCH_SHARDTIMEOUT

elasticsearch.shardTimeout

ELASTICSEARCH_SSL_CA

elasticsearch.ssl.ca

ELASTICSEARCH_SSL_CERT

elasticsearch.ssl.cert

ELASTICSEARCH_SSL_KEY

elasticsearch.ssl.key

ELASTICSEARCH_SSL_VERIFY

elasticsearch.ssl.verify

ELASTICSEARCH_STARTUPTIMEOUT

elasticsearch.startupTimeout

ELASTICSEARCH_URL

elasticsearch.url

ELASTICSEARCH_USERNAME

elasticsearch.username

KIBANA_DEFAULTAPPID

kibana.defaultAppId

KIBANA_INDEX

kibana.index

LOGGING_DEST

logging.dest

LOGGING_QUIET

logging.quiet

LOGGING_SILENT

logging.silent

LOGGING_VERBOSE

logging.verbose

OPS_INTERVAL

ops.interval

PID_FILE

pid.file

SERVER_BASEPATH

server.basePath

SERVER_HOST

server.host

SERVER_MAXPAYLOADBYTES

server.maxPayloadBytes

SERVER_NAME

server.name

SERVER_PORT

server.port

SERVER_SSL_CERT

server.ssl.cert

SERVER_SSL_KEY

server.ssl.key

XPACK_MONITORING_ELASTICSEARCH_URL

xpack.monitoring.elasticsearch.url

XPACK_MONITORING_ELASTICSEARCH_USERNAME

xpack.monitoring.elasticsearch.username

XPACK_MONITORING_ELASTICSEARCH_PASSWORD

xpack.monitoring.elasticsearch.password

XPACK_MONITORING_ENABLED

xpack.monitoring.enabled

XPACK_MONITORING_MAX_BUCKET_SIZE

xpack.monitoring.max_bucket_size

XPACK_MONITORING_MIN_INTERVAL_SECONDS

xpack.monitoring.min_interval_seconds

XPACK_MONITORING_NODE_RESOLVER

xpack.monitoring.node_resolver

XPACK_MONITORING_REPORT_STATS

xpack.monitoring.report_stats

XPACK_MONITORING_KIBANA_COLLECTION_ENABLED

xpack.monitoring.kibana.collection.enabled

XPACK_MONITORING_KIBANA_COLLECTION_INTERVAL

xpack.monitoring.kibana.collection.interval

XPACK_MONITORING_UI_CONTAINER_ELASTICSEARCH_ENABLED

xpack.monitoring.ui.container.elasticsearch.enabled

XPACK_SECURITY_ENABLED

xpack.security.enabled

XPACK_SECURITY_COOKIENAME

xpack.security.cookieName

XPACK_SECURITY_ENCRYPTIONKEY

xpack.security.encryptionKey

XPACK_SECURITY_SECURECOOKIES

xpack.security.secureCookies

XPACK_SECURITY_SESSIONTIMEOUT

xpack.security.sessionTimeout

这些变量可以用 dock-compose 来设置,例如 : 

services:
  kibana:
    image: docker.elastic.co/kibana/kibana:5.2.2
    environment:
      SERVER_NAME: kibana.example.org
      ELASTICSEARCH_URL: http://elasticsearch.example.org

环境变量优先覆盖 kibana.yml 文件中的配置。

Docker 中的默认值

以下配置在使用 Docker 镜像时具有不同的默认值 : 

配置默认值

server.host

"0"

elasticsearch.url

http://elasticsearch:9200

elasticsearch.username

elastic

elasticsearch.password

changeme

xpack.monitoring.ui.container.elasticsearch.enabled

true

这些配置定义在 kibana.yml 文件中。它们可以使用一个 自定义的 kibana.yml 文件,或者通过 环境变量 来覆盖默认值。