使用日志模板按模式相似性聚类消息
我们经常会遇到数百条模式相似、仅有一两个变量不同的日志行。Site24x7 AppLogs 不会将它们显示为独立的日志行,而是将其归为一行,并单独显示不同的变量及其指标。这意味着日志行经过软匹配,以对结构相似的消息进行分组——Site24x7 合并重复的文本字符串,并单独显示其中的变量部分。该功能还可以在饼图中显示字符串数据的变量参数,在折线图中显示数字数据,方便您轻松查看趋势。
如果公共文本字符串中存在多个变量,它们将显示为不同的列,并以颜色编码加以区分。
访问日志模板
您可以通过以下几个简单步骤查看查询的日志模板:
- 登录您的 Site24x7 账户,进入 AppLogs 标签页。
- 输入搜索查询。
- 结果加载完成后,点击右上角的 Log Templates 按钮。
- 从下拉菜单中选择与日志类型对应的任意字符串字段。此处可选择 Message。
这将把具有相似文本字符串的消息归为一组,并用 * 突出显示变量。
请参阅下方操作视频,了解如何对结构相似的消息进行分组:
使用案例
以如下日志行为例:
( inode2.apm- 2k12 r2-aio ) Unable to open queue on WebSphere MQ queue manager ''APMQA'': completion code 2; reason code 2085 . An failure occurred when opening the indicated WebSphere MQ message queue. The error codes relate to the MQOPEN call. Check the WebSphere MQ completion and reason codes in the WebSphere MQ Application Programming Reference manual to establish the cause of the error, and take the appropriate action. You might have to restart the integration node after you take this recovery action. If the failure to open occurred because the queue manager or queue did not exist, define these objects to WebSphere MQ. If the failure occurred because incorrect object names were specified, correct the message flow configuration, and attempt to redeploy the integration node.
此处,* 表示变量。请参阅下方截图,通过颜色编码更好地理解。您可以在 Count 列中查看归入该组的日志行数量。变量按时间分类,显示在右侧。

当存在多个变量时,它们将显示为不同的字段,并以不同颜色编码区分,以列的形式呈现在表格中。
您可以点击字段名称旁的
图标,查看该字段的图表。
您还可以点击已分组的日志行以展开并查看详细信息。
