打赏

日志监听部署

log.io日志监听部署

1.安装服务端

npm install -g log.io

vi ~/.log.io/server.json

{
"messageServer": {
"port": 6689,
"host": "127.0.0.1"
},
"httpServer": {
"port": 6688,
"host": "127.0.0.1"
},
"debug": false,
"basicAuth": {
"realm": "abc123xyz",
"users": {
"username1": "password1"
}
}
}

2.启动服务

log.io-server

http://localhost:6688

3.安装客户端

npm install -g log.io-file-input
vi ~/.log.io/inputs/file.json

{
"messageServer": {
"host": "127.0.0.1",
"port": 6689
},
"inputs": [
{
"source": "server1",
"stream": "app1",
"config": {
"path": "log.io-demo/file-generator/app1-server1.log"
}
},
{
"source": "server2",
"stream": "system-logs",
"config": {
"path": "/var/log/**/.log",
"watcherOptions": {
"ignored": "
.txt",
"depth": 99,
}
}
}
]
}

4.启动客户端

log.io-file-input

相关链接

https://github.com/NarrativeScience/log.io

posted @ 2020-07-24 08:52  苍山落暮  阅读(257)  评论(0编辑  收藏  举报