我在本地docker安装中设置了elasticsearch(6.2.4)和kibana(6.2.4)。 这两个码头的图片都是从官方码头中心站点拍摄的。
我有一个节点js应用程序,其中我使用winston(2.4.2),elasticsearch(14.2.2)和winston-elasticsearch(0.5.9)来尝试登录我的elasticsearch设置。
下面是我的代码: 初始化记录器-------------------------------
const es = require("elasticsearch");
const Elasticsearch = require("winston-elasticsearch");
const winston = require("winston");
const esClient = new es.Client({
host: "<ip address>:9200",
log: "trace",
index: "oversight",
sniffOnStart: true
});
this.elasticLogger = new (winston.Logger)({
levels: this.logLevels.levels,
transports: [
new Elasticsearch({ client: esClient, colorize: true })
],
exceptionHandlers: [
new Elasticsearch({ client: esClient, colorize: true })
]
exitOnError: false,
handleExceptions: true
});
this.elasticLogger.on("error", (err) => {
console.log(`Elastic Logger failed at ${new Date()} with error ${err} !`);
});
我还有一个用于控制台日志记录的传输,它运行良好,elasticsearch和kibana容器之间的连接也已启动并运行。
当我的应用程序的docker容器启动并开始记录时,以下是stdout信息:
Elasticsearch TRACE: 2018-04-25T14:43:36Z
-> GET http://<ip address>:9200/_nodes/_all/http?filter_path=nodes.*.http.publish_address%2Cnodes.*.name%2Cnodes.*.hostname%2Cnodes.*.host%2Cnodes.*.version
<- 200
{
"nodes": {
"2knkp79ZS0W_iCTWiHaGxQ": {
"name": "oversight_elasticsearch",
"host": "<ip address>",
"version": "6.2.4",
"http": {
"publish_address": "<ip address>:9200"
}
}
}
}
Elasticsearch TRACE: 2018-04-25T14:43:36Z
-> HEAD http://<ip address>:9200/
<- 200
但在尝试创建模板日志后,我收到以下错误:
Elasticsearch TRACE: 2018-04-25T14:43:36Z
-> PUT http://<ip address>:9200/_template/template_logs?create=true
{ ... a whole bunch of default settings...}
<- 400
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.cache.field.type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
}
],
"type": "illegal_argument_exception",
"reason": "unknown setting [index.cache.field.type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
"status": 400
}
在搜索当前github问题详细信息和其他页面时,我发现设置 - index.cache.field.type自版本0.26.0以来一直不是有效设置。
请指导我如何继续设置或此问题。是否还有其他可能错过的设置或设置?