大型网络场的事件日志自动化/工具

发布于 2024-07-10 02:30:41 字数 234 浏览 5 评论 0原文

我的一个好朋友在一家大型 ASP.NET 商店工作,该商店拥有一个拥有许多 Web 服务器(数十台)的网络农场。 应用程序将异常和消息记录到每个盒子上的事件日志中(而不是集中位置)。

有谁知道有一种便捷的方法可以对多个不同盒子上的事件日志执行统一报告?

或者,哪个更好: - 编写连接到每个盒子上的每个事件日志的工具? - 更改架构以将事件记录到数据库? - 我还没有考虑过其他一些机制吗?

A good friend of mine works for a large asp.net shop, with a web farm with many web servers (dozens). The application logs exceptions and messages to the event log on each box (not to a centralized location).

Does anyone know of a convenient way to perform unified reporting on event logs on a number of different boxes?

Or, which is better:
- write tools that connect to each event log on each box?
- change architecture to log events to the database?
- some other mechanism I haven't considered?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

北斗星光 2024-07-17 02:30:42

我的 ASP.Net 开发团队的成员都是 BareMetal 的免费软件 Bare Tail 在需要快速确定生产问题的根源时读取纯文本日志文件。 我相信您可以同时读取多个文件(在不同的选项卡上)。

如果需要,您仍然可以将日志文件数据上传到数据库。 但是,写入和读取本地日志文件比写入数据库要快得多且简单得多。 而且,一旦 Web 应用程序在生产中稳定下来,最可能的异常来源很可能是数据库连接丢失。 解决这个问题的一种方法是尝试写入数据库,如果失败,则写入日志文件。 然后,您可以使用这样的工具来更轻松地读取日志文件数据。

Members of my ASP.Net development team are enthusiastic users of the free software from BareMetal called Bare Tail to read plain text log files when they need to quickly determine the source of a production issue. I believe that you can read from multiple files at the same time (on different tabs).

You could still upload the log file data to a database, if desired. But, writing to and reading from a local log file is much faster and simpler than writing to a database. And, once a web app is stabilized in production, the most likely source of exceptions may well be loss of the database connection. One way around that is to try to write to the database, and if that fails, write to a log file. You could then use a tool like this to more easily read the log file data.

阳光下慵懒的猫 2024-07-17 02:30:41

我将使用 Log4Net (或类似的东西)进行日志记录,将文件保存到磁盘,并定期轮换日志文件。 (我个人不太喜欢 Windows 事件日志。)然后在每个盒子上都有一个后台服务,将日志文件上传到数据库表中 - 跟踪哪个日志条目来自哪个盒子。

这使得对整个网络场的搜索变得简单,同时保留有关哪个日志条目来自哪里的信息。

类似的问题:

I would use Log4Net (or something similar) for the logging, saving the files to disk, and rotating log file periodically. (I'm not a big fan of the Windows event log, personally.) Then have a background service on each box which uploads the log file into a database table - keeping track of which log entry came from which box.

This gives simple searching over the whole web farm while maintaining the information about which log entry came from where.

Similar questions:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文