Event logging with distributed database for node.j

2019-04-14 02:08发布

问题:

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.