赞
踩
docker pull kibana:8.7.0
不可用elastic这个用户
[FATAL][root] Error: [config validation of [elasticsearch].username]: value of "elastic" is forbidden. This is a superuser account that cannot write to system indices that Kibana needs to function. Use a service account token instead.
创建新账户
elasticsearch-users useradd username
给账户授权
elasticsearch-users roles -a superuser username
elasticsearch-users roles -a kibana_system username
> 此处可用授权过的账户直接创建并运行容器
docker run -d \
--name kibana \
-e ELASTICSEARCH_HOSTS=http://ip:port \
-e ELASTICSEARCH_USERNAME=username \
-e ELASTICSEARCH_PASSWORD=password \
-p 5601:5601 \
kibana:8.7.0
docker run -d \
--name kibana \
-e ELASTICSEARCH_HOSTS=http://ip:port \
-v kibana_config:/usr/share/kibana/config \
-p 5601:5601 \
kibana:8.7.0
修改 /var/lib/docker/volumes/kibana_config/_data/kibana.yml
server.host: "0.0.0.0"
server.shutdownTimeout: "5s"
#hosts这个也可以在环境变量那改 此处也可以
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
monitoring.ui.container.elasticsearch.enabled: true
#添加这两行即可
elasticsearch.username: elastic
elasticsearch.password: elastic
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。