最佳日志实践_了解事件和日志管理最佳实践

最佳日志实践

Log management is considered one of the key elements when it comes to managing, maintaining and troubleshooting IT systems. However, the success that you can reap from log management will trickle down to the practices that you indulge in. Without setting the best practices in place, it can be quite easy for your staff to be overwhelmed with managing your logs, which could end up putting your business at risk of system or application issues.

日志管理被认为是IT系统管理,维护和故障排除的关键要素之一。 但是,您可以从日志管理中获得的成功将落到您沉迷于的实践中。如果没有适当的最佳实践,那么您的员工很容易不知所措地管理日志,这最终可能使您的企业面临系统或应用程序问题的风险。

Event & Log Management Best Practices

Image Source

图片来源

Here are some amazing practices to help you make the most of your log management efforts:

以下是一些出色的实践,可帮助您充分利用日志管理工作:

整理数据 (Structure Your Data)

Your data should be easily readable and understood from a machine and human-readable perspective. Failing to understand specific logging formats will make it tough to come up with valuable insight from your log data. For instance, when using log4net to study log data that is in a format that is hard to understand, troubleshoot any problems in your application will be a challenge.

您的数据应易于阅读并从机器和人类可读的角度理解。 如果无法理解特定的日志记录格式,将很难从日志数据中得出有价值的见解。 例如,当使用log4net研究格式难以理解的日志数据时,对应用程序中的任何问题进行故障排除将是一个挑战。

Common log structuring formats include KVP (key-value pair) and JSON. Both are easy to be understood by humans and also make it easy for software to extract resourceful data about the app from the semi-structured data formats. Ensure your data is structured in a way that makes it easy to analyze and understand.

常见的日志结构格式包括KVP(键值对)和JSON。 两者都很容易为人所理解,也使软件易于从半结构化数据格式中提取有关该应用程序的资源丰富的数据。 确保您的数据以易于分析和理解的方式进行结构化。

集中您的日志数据 (Centralize Your Log Data)

For optimal log management, logs should be separated from the production environment and shifted to a centralized location, according to a Tech Target article. Other than facilitating organized arrangement, this consolidation of logs enhances analysis by making it easy to identify the correlation of the collected data. In case the data is produced in an auto-scaling environment, you can prevent the loss of data ad hoc.

为了获得最佳的日志管理,应根据技术目标文章将日志与生产环境分开,并转移到集中位置 。 除了便于组织安排之外,这种日志合并还可以通过轻松识别收集到的数据的相关性来增强分析能力。 如果数据是在自动缩放环境中生成的,则可以防止临时丢失数据。

Centralizing the logs also allows the support team, and developers to gain access to the logs without necessarily gaining access to the production environment. As a result, the changes they make will have little to no effect on the environment. Since this consolidation makes duplication of logs easy, you can still retain your data even after hackers delete the original logs.

集中日志还可以使支持团队和开发人员获得对日志的访问权限,而不必获得对生产环境的访问权限。 结果,他们所做的更改对环境几乎没有影响。 由于这种合并使日志的复制变得容易,因此即使黑客删除了原始日志,您仍然可以保留数据。

练习端到端日志记录 (Practice End-To-End Logging)

To overcome application issues and have a deeper understanding of how your app ticks, you ought to widely grasp the various aspects of your application through your logs. Most people think that logging is all about understanding the data from the server end. However, adding aspects such as end-user buy-in and even the underlying layers into the areas that you pay attention to when log monitoring is equally as important.

为了克服应用程序问题并更深入地了解应用程序的运行方式,您应该通过日志广泛掌握应用程序的各个方面。 大多数人认为日志记录就是要了解服务器端的数据。 但是,在日志监视同等重要时,将最终用户买入甚至底层等方面添加到您要注意的区域中。

End-to-end user logging will give you enough insight to understand logging from the perspective of the end user. It will allow you to account for page loading times, network latency and even delays in database transactions. As a result, you can improve your user experience.

端到端用户日志记录将为您提供足够的洞察力,以便从最终用户的角度了解日志记录。 它可以让您考虑页面加载时间,网络延迟,甚至数据库事务延迟。 结果,您可以改善用户体验。

利用实时监控 (Leverage Real-Time Monitoring)

Issues with your production can easily lead to undesirable outcomes such as having unhappy customers, missing data and even lost purchases, according to Provide Support. Since every second counts when dealing with production issues, then real-time monitoring can be quite crucial for smooth service delivery.

根据Provide Support的说法,生产中的问题很容易导致不良后果,例如客户不满意 ,数据丢失甚至购买丢失。 由于每秒钟都在处理生产问题,因此实时监控对于顺利提供服务至关重要。

Event & Log Management Best Practices

Image Source

图片来源

Other than receiving notifications of any inconsistencies, having the ability to identify and solve these issues in real-time can turn out to be a lifesaver for your business. Such a capability will offer customers the power to analyze logs as users interact with the system. On the other hand, the support staff can deal with customer issues as they come in to prevent having a backlog of complaints.

除了接收到任何不一致的通知之外,具有实时识别和解决这些问题的能力可能会为您的企业节省时间。 当用户与系统交互时,这种功能将为客户提供分析日志的能力。 另一方面,支持人员可以处理客户遇到的问题,以防止积压的投诉。

结论 (Conclusion)

Offering stellar services for your app is all about compliance and dealing with issues as they arise. As long as your customers are happy, then the cost of compliance will be worth your while. Consider adopting the above practices to smoothen your log management process.

为您的应用程序提供一流的服务,不仅涉及合规性,还可以解决出现的问题。 只要您的客户满意,那么合规成本将是您值得的。 请考虑采用上述做法来简化日志管理过程。

翻译自: https://www.thecrazyprogrammer.com/2018/08/understanding-event-log-management-best-practices.html

最佳日志实践

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值