Event logging with distributed database for node.js (MongoDB?)

爱⌒轻易说出口 提交于 2019-12-12 09:02:24

问题


I am looking for system or library for node.js, that can log information about client access on every remote server and automatically gather that information on central log server for later analysis. Remote server will have write only access, while central server will accumulate a lot of data to read.

I hope there is solution using distributed [NoSQL] database, like MongoDB. However I have not found how to set it up.

For example I hope that cleaning old data can be initiated on central log server (when data has been processed) and entries on old dates can be removed on remote server with little overhead.

Currently we have logging into files and Hadoop system for log analysis. But I think we need to accumulate data in database.


回答1:


Winston, currently the best logging framework for node.js, has option to log into MongoDB or CouchDB.




回答2:


Scribe could be what you're looking for. There are node packages too

I have never checked it out so I'd be interested in reading your thoughts in the comments if you investigate it and find it good/bad, easy/hard to setup, etc.




回答3:


MongoDB or any other distributed databases will not solve problem. In-house project must be created. Some features of MongoDB for consideration:

Capped Collections are actually way to loose data. I may be good for short history.



来源:https://stackoverflow.com/questions/13715970/event-logging-with-distributed-database-for-node-js-mongodb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!