日志监听部署
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
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
相关链接
【励志篇】:
古之成大事掌大学问者,不惟有超世之才,亦必有坚韧不拔之志。