使用 shuf 来打乱一个文件中的行或是选择文件中一个随机的行。

es searchguard插件安装之后,kibana也进行配置了,但是查看kibana Monitoring

Kibana | 作者 zxang | 发布于2019年01月09日 | 阅读数:6774

1.es集群安装了 searchguard插件,并且也正常启动了,可以加-u admin:admin进行访问了
2.kibana也安装了searchguard-kibana插件,启动kibana之后可以输入用户名:密码 进行访问
3.打开kibana的 Monitoring 功能,提示无权限,同时kibana日志报错:
4.查看日志报错,看其中有显示Unauthorized,个人判断应该是账号权限的问题,但是使用admin, kibanaserver, kibana,kibanaro访问均失败,报错相同。
5.大佬们有遇到如此错误吗?
Image_10.png Image_11.png
已邀请:

rochy - rochy_he

赞同来自:

再配置文件里面加上下面的配置:
# If your Elasticsearch is protected with basic authentication, these settings provide
# the username and password that the Kibana server uses to perform maintenance on the Kibana
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
# is proxied through the Kibana server.
elasticsearch.username: "用户名"
elasticsearch.password: "密码"

zxang

赞同来自:

kibana配置如下:

zqc0512 - andy zhou

赞同来自:

这玩意是searchguard设置的 用户里面要添加角色 有几个索引他没有权限读取。
你创建个新的用户吧。角色用admin

ccsy

赞同来自:

用searchguard默认的admin用户配置在kibana中,登录也用admin试试

ccsy

赞同来自:

这是我的配置

zxang

赞同来自:

这个是我的集群索引,然后和searchguard权限配置文件:

zqc0512 - andy zhou

赞同来自:

  indices:
    '*':
      '*':
      - "UNLIMITED"
试试这玩意。

ccsy

赞同来自:

看下admin的权限

zxang

赞同来自:

这是我的admin权限

zxang

赞同来自:

大佬们,能不能给一个详细的链接或者配置,我觉得我配置是ok的,但还是无法访问monitor这个功能!

zxang

赞同来自:

request [05:04:14.871] [error][monitoring-ui] Authentication Exception :: {"path":"/.monitoring-es-2-*%2C.monitoring-es-6-*/_search","query":{"filter_path":"hits.hits._source.cluster_uuid,hits.hits._source.cluster_name,hits.hits._source.version,hits.hits._source.license,hits.hits._source.cluster_stats,hits.hits._source.cluster_state"},"body":"{\"size\":10000,\"query\":{\"bool\":{\"filter\":[{\"bool\":{\"should\":[{\"term\":{\"_type\":\"cluster_stats\"}},{\"term\":{\"type\":\"cluster_stats\"}}]}},{\"range\":{\"timestamp\":{\"format\":\"epoch_millis\",\"gte\":1547438640390,\"lte\":1547442240391}}}]}},\"collapse\":{\"field\":\"cluster_uuid\"},\"sort\":{\"timestamp\":{\"order\":\"desc\"}}}",[b]"statusCode":401,"response":"Unauthorized","wwwAuthenticateDirective":"Basic realm=\"Search Guard\""[/b]}
at respond (/export/servers/kibana-5.6.4-linux-x86_64/node_modules/elasticsearch/src/lib/transport.js:295:15)
at checkRespForFailure (/export/servers/kibana-5.6.4-linux-x86_64/node_modules/elasticsearch/src/lib/transport.js:254:7)
at HttpConnector.<anonymous> (/export/servers/kibana-5.6.4-linux-x86_64/node_modules/elasticsearch/src/lib/connectors/http.js:159:7)
at IncomingMessage.bound (/export/servers/kibana-5.6.4-linux-x86_64/node_modules/elasticsearch/node_modules/lodash/dist/lodash.js:729:21)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
这是kibana日志里面的报错,加错显示的是没有权限,但是kibana.yml里面已经使用admin账户进行访问了,登录kibana里面也用的admin账号,能够登录,但是打不开monitoring界面,每次打开时kibana日志会报上面这个错。
浏览器会报下面这个错
Access Denied
You are not authorized to access Monitoring. To use Monitoring, you need the privileges granted by both the `kibana_user` and `monitoring_user` roles.
If you are attempting to access a dedicated monitoring cluster, this might be because you are logged in as a user that is not configured on the monitoring cluster.

zxang

赞同来自:

查看了一下,发现我点击Monitoring这个按钮时,发送的请求是没有带username:password的,然后我复制了那个请求,在本地使用curl命令加-u username:password是会出现对应的结果。 请问一下这一块是在哪儿配置呢? (kibana里面已经配置了elasticsearch.username、 elasticsearch.password了)

zxang

赞同来自:

别沉了啊,大佬们,求助呀

zqc0512 - andy zhou

赞同来自:

升级下小版本试下,感觉上应该是配置问题。
不行你自己再创建一个用户 搞成superadmin角色试下连接。
我配置这玩意没撒大问题呢,就是麻烦。
 

Leeeo - 90后IT男

赞同来自:

我问一个问题哈,你们kibnan的monitor模块是怎么安上去的?为什么我们的kibnan没有monitor模块?

zxang

赞同来自:

各位,当前解决办法是使用Google浏览器ModHeader插件,该插件的功能是在发送请求是,带上自定义的请求头。然后自定义username:password请求头,开启插件,显示Monitor结果!

要回复问题请先登录注册