当前位置:网站首页>第九章 设置结构化日志记录(一)
第九章 设置结构化日志记录(一)
2022-06-26 05:11:00 【yaoxin521123】
第九章 设置结构化日志记录(一)
IRIS 支持结构化日志记录。
创建多个日志,每个日志用于不同的目的。从以前的产品迁移过来的客户可以像过去一样利用这些日志,但现在还可以将所有日志信息导入一个单一的、中央的、机器可读的日志文件——结构化日志。然后可以将此文件与第三方分析工具一起使用。
本文概述了结构化日志中的信息,展示了日志示例,并描述了如何启用结构化日志记录。
结构化日志中可用的信息
当启用结构化日志记录时,系统会将相同的数据写入结构化日志,它也会写入其他日志(无论哪个)。例如,系统将相同的行写入messages.log 和结构化日志。
启用结构化日志记录后,结构化日志包含以下所有信息:
- 写入
messages.log的信息。这包括需要注意的警报、有关系统启动和关闭的信息、有关日志文件和WIJ文件的高级信息、有关配置更改 (CPF) 的信息以及与许可相关的信息。 - 写入审计数据库的信息。详细信息取决于正在审核的事件。
示例输出
本部分显示结构化日志记录实用程序的示例输出,用于名称/值对格式和 JSON 格式。
名称/值对
以下输出使用格式选项 NVP(名称/值对)。此示例经过编辑以用于显示目的;在实际输出中,每个条目只占一行,条目之间没有空行。
when="2019-08-01 18:43:02.216" pid=8240 level=SEVERE event=Utility.Event
text="Previous system shutdown was abnormal, system forced down or crashed"
when="2019-08-01 18:43:05.290" pid=8240 level=SEVERE event=Utility.Event
text="LMF Error: No valid license key. Local key file not found and LicenseID not defined."
when="2019-08-01 18:43:05.493" pid=8240 level=WARNING event=Generic.Event
text="Warning: Alternate and primary journal directories are the same"
when="2019-08-01 18:46:10.493" pid=11948 level=WARNING event=System.Monitor
text="CPUusage Warning: CPUusage = 79 ( Warnvalue is 75)."
在这种格式中,文件中的每一行都包含一组由空格分隔的名称/值对。每个名称/值对的格式为 name=value,如果 value 包含空格字符,则 value 用括号括起来。日志文件中的行包含以下部分或全部名称/值对:
| Name | Value |
|---|---|
| host | 运行 ^LOGDMN 的主机的名称(如果在管道命令中提供)。 |
| instance | 运行 ^LOGDMN 的实例的名称(如果在管道命令中提供)。 |
| when | 始终包括在内。条目的时间戳,格式为 yyyy-mm-dd hh:mm:ss.sss |
| pid | 始终包括在内。生成条目的进程的 ID |
| level | 始终包括在内。此条目的日志级别。这具有以下值之一: - DEBUG2 用于详细的调试消息(例如十六进制转储)。 - DEBUG 用于不太详细的调试消息。 - INFO 用于信息性消息,包括所有审计事件。 - WARNING 用于指示可能需要注意但未中断操作的问题。 - SEVERE 用于严重错误,表示操作中断的问题。 -FATAL 用于致命错误,表示问题导致系统无法运行。 |
| event | 始终包括在内。生成条目的代码的标识符,通常是类名。 |
| text | 始终包括在内。解释条目的描述性字符串。 |
| source | 作为审计事件源的组件。对于组件,这始终是 %System。当应用程序代码写入事件日志时,source 指示应用程序代码中的组件。 |
| type | 对审计事件的信息进行分类。 |
| group | 审计事件的组(如果有)。 |
| namespace | 生成条目的命名空间。这对于检查特定于名称空间的行为很有用,例如应用程序错误和互操作性产品的活动。 |
JSON
以下输出使用格式选项 JSON。此示例经过编辑以用于显示目的;在实际输出中,每个条目只占一行,条目之间没有空行。
{
"when": "2019-08-07 14:11:04.904", "pid": "8540", "level": "SEVERE", "event": "Utility.Event",
"text": "Previous system shutdown was abnormal, system forced down or crashed"}
{
"when": "2019-08-07 14:11:08.155", "pid": "8540", "level": "SEVERE", "event": "Utility.Event",
"text": "LMF Error: No valid license key. Local key file not found and LicenseID not defined."}
{
"when": "2019-08-07 14:11:08.311", "pid": "8540", "level": "WARNING", "event": "Generic.Event",
"text": "Warning: Alternate and primary journal directories are the same"}
{
"when": "2019-08-07 14:16:13.843", "pid": "10816", "level": "WARNING", "event": "System.Monitor",
"text": "CPUusage Warning: CPUusage = 84 ( Warnvalue is 75)."}
在这种格式中,文件中的每一行都是一个带有一组属性的 JSON 对象。属性的名称(以及属性中包含的值)与上一节中为名称/值对列出的名称相同。
边栏推荐
- Practical cases | getting started and mastering tkinter+pyinstaller
- Windows下安装Tp6.0框架,图文。Thinkphp6.0安装教程
- 6.1 - 6.2 introduction to public key cryptography
- LeetCode 19. 删除链表的倒数第 N 个结点
- cartographer_backend_constraint
- 86.(cesium篇)cesium叠加面接收阴影效果(gltf模型)
- ECCV 2020 double champion team, take you to conquer target detection on the 7th
- Zuul implements dynamic routing
- PHP之一句话木马
- cartographer_pose_graph_2d
猜你喜欢

YOLOV5超参数设置与数据增强解析

ECCV 2020 double champion team, take you to conquer target detection on the 7th

Codeforces Round #800 (Div. 2)

瀚高数据库自定义操作符‘!~~‘

《财富自由之路》读书之一点体会

百度API地图的标注不是居中显示,而是显示在左上角是怎么回事?已解决!

Status of processes and communication between processes

Tensorflow and deep learning day 3

Transport layer TCP protocol and UDP protocol

cartographer_pose_graph_2d
随机推荐
红队得分方法统计
Zuul 實現動態路由
Schematic diagram of UWB ultra high precision positioning system
First day of deep learning and tensorflow learning
6.1 - 6.2 Introduction à la cryptographie à clé publique
为什么许多shopify独立站卖家都在用聊天机器人?一分钟读懂行业秘密!
Generalized linear model (logistic regression, Poisson regression)
Codeforces Round #800 (Div. 2)
0622 horse palm fell 9%
[latex] error type summary (hold the change)
torchvision_transform(图像增强)
广和通联合安提国际为基于英伟达 Jetson Xavier NX的AI边缘计算平台带来5G R16强大性能
RESNET practice in tensorflow
Genius makers: lone Rangers, technology giants and AI | ten years of the rise of in-depth learning
5. <tag-栈和常规问题>补充: lt.946. 验证栈序列(同剑指 Offer 31. 栈的压入、弹出序列)
Codeforces Round #802 (Div. 2)(A-D)
2. < tag dynamic programming and conventional problems > lt.343 integer partition
A ZABBIX self discovery script (shell Basics)
两步处理字符串正则匹配得到JSON列表
LSTM in tensorflow_ Layers actual combat