【发布时间】:2018-07-28 13:16:47
【问题描述】:
尝试设置我的第一个 ELK 堆栈,但我似乎无法让 Kibana 识别我的索引。
我正在使用 ElasticSearch 6.x
使用curl -XGET -u elastic:mysupersecurepasswordofcourse "http://localhost:9200/_cat/indices?v" -H 'Content-Type: application/json' 我得到:
health status index uuid pri rep
docs.count docs.deleted store.size pri.store.size
green open .monitoring-es-6-2018.02.17 Fjh6Wk-RSMW-jCmMXbPexg 1 0
37758 72 27.4mb 27.4mb
green open .security-6 grVz87fZQ6GBsTvl9TXRUw 1 0
3 0 9.9kb 9.9kb
green open .monitoring-kibana-6-2018.02.17 d0tKI_50RfCaALx3hYtnHw 1 0
3056 0 1.6mb 1.6mb
green open .watcher-history-7-2018.02.17 KD1SdjJ0QHCmGnarHq9y2A 1 0
3532 0 7.7mb 7.7mb
green open .kibana TgCs4oAdRsandc3US1haxw 1 0
2 0 13.2kb 13.2kb
green open .monitoring-alerts-6 xuTWxQIlTIawPJGSCiZNYA 1 0
4 0 23.9kb 23.9kb
green open .triggered_watches JBQvWNh8ShG-M795rNKA4Q 1 0
2 124 348.2kb 348.2kb
yellow open tick 6IlSo9exRe2V350wXfEvJA 5 1
3 0 16kb 16kb
green open .watches Www6IbiaRPGOWcJMj0zmjw 1 0
6 0 101.4kb 101.4kb
tick 是我想要在 kibana 中显示的内容。
我可以这样做:curl -XGET -u elastic:superstrong "http://localhost:9200/tick/_doc/tIBvpWEBbXT5kQhPxkTg?pretty" -H 'Content-Type: application/json' 并取回我所期望的 - 一个文档。
此设置确实安装了 xpack,并且我已确保已设置 elasticsearch.username 和 elasticsearch.password。我不确定它是否相关,但如果我尝试从 Kibana 开发控制台执行 PUT/POST,我会得到:
{
"error": {
"root_cause": [
{
"type": "security_exception",
"reason": "action [indices:admin/create] is unauthorized for user [kibana]"
}
],
"type": "security_exception",
"reason": "action [indices:admin/create] is unauthorized for user [kibana]"
},
"status": 403
}
该错误消息似乎很有用,但谷歌搜索却一无所获。更复杂的是,如果我从开发控制台运行GET _cat/indices,我会得到与在 CLI 上相同的结果。
那么,如何让 Kibana 向我显示 tick 索引中的文档?
编辑:我还要注意我正在访问 app/kibana#/management/kibana/index?_g=() 以尝试创建索引;但是,我看到Couldn't find any Elasticsearch data。如果我点击Check for new data,我不会收到任何错误,但什么也找不到。如果我选中该框,Include system indices 我会看到上面输出中包含的 8 个中的 4 个:.kibana、.monitoring-alerts-6、.monitoring-es-6-2018.02.17、.monitoring-kibana-6-2018.02.17
Edit2:我现在确实看到,如果我单击 Check for new data,我会在控制台 Error: Minified React error #200; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=200 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. 中收到 JS 错误。
【问题讨论】:
-
尝试禁用xpack安全包再试一次,错误仅与用户权限有关,可能设置不正确。关于 React 错误你可以忽略它,它只与缩小和非缩小 JS 相关。
标签: elasticsearch kibana