其中的NoSQL数据库应该使用的记录? [英] Which NoSQL database should I use for logging?

查看:383
本文介绍了其中的NoSQL数据库应该使用的记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你有没有日志记录到NoSQL数据库的可扩展应用程序的经验吗?我做了一些研究,NoSQL数据库的日志记录,发现MongoDB的似乎是一个不错的选择。另外,我发现 log4mongo网这似乎是一个非常简单的选择。

Do you have any experience logging to NoSQL databases for scalable apps? I have done some research on NoSQL databases for logging and found that MongoDB seems to be a good choice. Also, I found log4mongo-net which seems to be a very straightforward option.

你会推荐这种做法?是否有任何其他建议?

Would you recommend this kind of approach? Are there any other suggestions?

推荐答案

我已经决定修改该接受的答案是最先进的国家已经显著在过去18个月移动,和更好的替代品存在的。

I've decided to revise this accepted answer as the state of the art has moved significantly in the last 18 months, and much better alternatives exist.

新建答案

MongoDB是一个可扩展的日志解决方案一分面值的选择。有这种情况的通常的原因(写入负载下,例如性能)。我想提出一个,这是它只解决了一个用例的记录解决方案。

MongoDB is a sub-par choice for a scalable logging solution. There are the usual reasons for this (write performance under load for example). I'd like to put forward one more, which is that it only solves a single use case in a logging solution.

一个强大的日志记录解决方案需要至少覆盖​​以下阶段:

A strong logging solution needs to cover at least the following stages:

  • 收藏
  • 交通
  • 处理
  • 存储
  • 搜索
  • 在可视化

MongoDB中作为一个选择只解决了存储用例(尽管有些不好)。一旦完整的链条进行了分析,有更合适的解决方案。

MongoDB as a choice only solves the Storage use case (albeit somewhat poorly). Once the complete chain is analysed, there are more appropriate solutions.

@KazukiOhta提到几个选项。我的preferred端到端的解决方案,这些天包括:

@KazukiOhta mentions a few options. My preferred end to end solution these days involves:

  • Logstash-Forwarder for Collection & Transport
  • Logstash & Riemann for Processing
  • ElasticSearch for Storage & Queries
  • Kibana3 for Visualisation

底层使用ElasticSearch的日志数据存储使用当前最好的日志品种的NoSQL解决方案和搜索的使用情况。这Logstash-转发/ Logstash / ElasticSearch / Kibana3是 ElasticSearch 伞下的事实使得更令人信服的理由。

The underlying use of ElasticSearch for log data storage uses the current best of breed NoSQL solution for the logging and searching use case. The fact that Logstash-Forwarder / Logstash / ElasticSearch / Kibana3 are under the umbrella of ElasticSearch makes for an even more compelling argument.

由于Logstash也可以充当石墨代理,非常类似的链可用于收集和分析度量标准(不仅记录)的相关问题建

Since Logstash can also act as a Graphite proxy, a very similar chain can be built for the associated problem of collecting and analysing metrics (not just logs).

旧答案

MongoDB的封顶收藏是非常流行和的适用于记录,享有作为模式少,这通常是一个语义适合记录额外的奖励。通常,我们只知道我们要记录好到项目,或在某些问题已经在生产中被发现。关系型数据库或严格的模式往往是难以改变在这些情况下,并试图让他们'灵活'往往只是为了让他们'慢',不易理解和使用。

MongoDB Capped Collections are extremely popular and suitable for logging, with the added bonus of being 'schema less', which is usually a semantic fit for logging. Often we only know what we want to log well into a project, or after certain issues have been found in production. Relational databases or strict schemas tend to be difficult to change in these cases, and attempts to make them 'flexible' tends just to make them 'slow' and difficult to use or understand.

但是,如果你想管理日志中的黑暗和有激光去,使它看起来像你从太空总是有 Graylog2 它使用的MongoDB作为其整体基础设施的一部分,但提供了很多更多的放在上面,如通用,可扩展的格式,一个专门的日志收集服务器,分布式架构和时髦的用户界面。

But if you'd like to manage your logs in the dark and have lasers going and make it look like you're from space there's always Graylog2 which uses MongoDB as part of its overall infrastructure but provides a whole lot more on top such as a common, extensible format, a dedicated log collection server, distributed architecture and a funky UI.

这篇关于其中的NoSQL数据库应该使用的记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆