[英]Can't send log from Hapi-Pino to Elasticsearch
hapi
and hapi-pino
for logging.我正在为网站构建服务器,使用hapi
和hapi-pino
进行日志记录。elasticsearch
and kibana
to do it我使用elasticsearch
和kibana
来做hapi-pino
and Elasticsearch
, I try to use pino-elasticsearch
to send log.在hapi-pino
和Elasticsearch
之间,我尝试使用pino-elasticsearch
elasticsearch 发送日志。 However, it didn't work, elasticsearch didn't get anything This is my code for registering hapi-pino:但是,它没有用,elasticsearch 没有得到任何东西这是我注册 hapi-pino 的代码:const streamToElastic = PinoElasticsearch({
index: 'api',
type: 'log',
consistency: 'one',
node: 'http://elastic:changeme@localhost:9200',
'es-version': 6,
'bulk-size': 200,
ecs: true
});
await server.register({
plugin: HapiPino,
options: {
logPayload: true,
prettyPrint: process.env.NODE_ENV !== 'production',
redact: {
paths: ['req.headers', 'payload.user.password', 'payload.file'],
remove: true
},
stream: streamToElastic
}
});
Thanks for any helps and sorry about my poor English!感谢您对我糟糕的英语的任何帮助和抱歉!
http client did not trust this server's certificate, closing connection Netty4HttpChannel{localAddress=/[0:0:0:0:0:0:0:1]:9200, remoteAddress=/[0:0:0:0:0:0:0:1]:59763} http 客户端不信任此服务器的证书,关闭连接 Netty4HttpChannel{localAddress=/[0:0:0:0:0:0:0:1]:9200, remoteAddress=/[0:0:0:0:0: 0:0:1]:59763}
I am getting error like this when I try to connect.当我尝试连接时,我收到这样的错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.