我使用简单的nodejs应用程序,它将消息记录到elasticsearch (https://cloud.elastic.co/)中。
我使用winston-elasticsearch和温斯顿软件包。
应用程序成功地在本地elasticsearch停靠容器中记录消息,但在elasticsearch云中没有记录消息。
我使用这个简单的应用程序:
首先,我得到了错误:ProductNotSupportedSecurityError:客户端由于服务器端的安全权限,无法验证服务器是否是Elasticsearch。,但我只是通过在elastic.js中正确指定用户和密码来解决这个问题。
在此之后,我希望它能够工作,但返回了这个错误:statusCode: 400。ResponseError: illegal_argument_exception: illegal_argument_exception原因:操作/元数据行1包含一个未知参数_type
发布于 2022-11-29 00:32:22
不建议使用文档类型(_type)参数:
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html
温斯顿-elasticsearch在0.15版中删除了_type,您的示例使用0.8,所以请尝试升级包。
https://github.com/vanthome/winston-elasticsearch/blob/master/CHANGELOG.md#0150--2021-02-28
https://stackoverflow.com/questions/74605500
复制相似问题