- Fleet 和 Elastic Agent 指南其他版本
- Fleet 和 Elastic Agent 概述
- Beats 和 Elastic Agent 功能
- 快速入门
- 从 Beats 迁移到 Elastic Agent
- 部署模型
- 安装 Elastic Agent
- 安装 Fleet 管理的 Elastic Agent
- 安装独立的 Elastic Agent
- 在容器化环境中安装 Elastic Agent
- 在容器中运行 Elastic Agent
- 在 Fleet 管理的 Kubernetes 上运行 Elastic Agent
- 使用 Helm 在 Kubernetes 上安装 Elastic Agent
- 示例:使用 Helm 在 Kubernetes 上安装独立的 Elastic Agent
- 示例:使用 Helm 在 Kubernetes 上安装 Fleet 管理的 Elastic Agent
- Fleet 管理的高级 Elastic Agent 配置
- 在 Elastic Agent 上配置 Kubernetes 元数据增强
- 在 Fleet 管理的 GKE 上运行 Elastic Agent
- 在 Fleet 管理的 Amazon EKS 上运行 Elastic Agent
- 在 Fleet 管理的 Azure AKS 上运行 Elastic Agent
- 在 Kubernetes 上运行独立的 Elastic Agent
- 在 Kubernetes 上扩展 Elastic Agent
- 在 Kubernetes 集成中使用自定义摄取管道
- 环境变量
- 将 Elastic Agent 作为 OTel 收集器运行
- 在没有管理权限的情况下运行 Elastic Agent
- 从 MSI 包安装 Elastic Agent
- 安装布局
- 气隙环境
- 将代理服务器与 Elastic Agent 和 Fleet 一起使用
- 从边缘主机卸载 Elastic Agent
- 在边缘主机上启动和停止 Elastic Agent
- Elastic Agent 配置加密
- 安全连接
- 在 Fleet 中管理 Elastic Agent
- 配置独立的 Elastic Agent
- 创建独立的 Elastic Agent 策略
- 配置文件结构
- 输入
- 提供程序
- 输出
- SSL/TLS
- 日志记录
- 功能标志
- Agent 下载
- 配置文件示例
- 授予独立的 Elastic Agent 对 Elasticsearch 的访问权限
- 示例:将独立的 Elastic Agent 与 Elastic Cloud Serverless 一起使用来监控 nginx
- 示例:将独立的 Elastic Agent 与 Elasticsearch Service 一起使用来监控 nginx
- 调试独立的 Elastic Agent
- 使用 Elastic Agent 进行 Kubernetes 自动发现
- 监控
- 参考 YAML
- 管理集成
- 定义处理器
- 处理器语法
- add_cloud_metadata
- add_cloudfoundry_metadata
- add_docker_metadata
- add_fields
- add_host_metadata
- add_id
- add_kubernetes_metadata
- add_labels
- add_locale
- add_network_direction
- add_nomad_metadata
- add_observer_metadata
- add_process_metadata
- add_tags
- community_id
- convert
- copy_fields
- decode_base64_field
- decode_cef
- decode_csv_fields
- decode_duration
- decode_json_fields
- decode_xml
- decode_xml_wineventlog
- decompress_gzip_field
- detect_mime_type
- dissect
- dns
- drop_event
- drop_fields
- extract_array
- fingerprint
- include_fields
- move_fields
- parse_aws_vpc_flow_log
- rate_limit
- registered_domain
- rename
- replace
- script
- syslog
- timestamp
- translate_sid
- truncate_fields
- urldecode
- 命令参考
- 故障排除
- 发行说明
解码 XML Windows 事件日志
编辑解码 XML Windows 事件日志
编辑此功能为技术预览版,可能会在未来的版本中更改或删除。Elastic 将努力解决任何问题,但技术预览版的功能不受官方 GA 功能的支持 SLA 约束。
decode_xml_wineventlog
处理器解码存储在 field
键下的 XML 格式的 Windows 事件日志数据。它将结果输出到 target_field
中。
示例
编辑- decode_xml_wineventlog: field: event.original target_field: winlog
{ "event": { "original": "<Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'><System><Provider Name='Microsoft-Windows-Security-Auditing' Guid='{54849625-5478-4994-a5ba-3e3b0328c30d}'/><EventID>4672</EventID><Version>0</Version><Level>0</Level><Task>12548</Task><Opcode>0</Opcode><Keywords>0x8020000000000000</Keywords><TimeCreated SystemTime='2021-03-23T09:56:13.137310000Z'/><EventRecordID>11303</EventRecordID><Correlation ActivityID='{ffb23523-1f32-0000-c335-b2ff321fd701}'/><Execution ProcessID='652' ThreadID='4660'/><Channel>Security</Channel><Computer>vagrant</Computer><Security/></System><EventData><Data Name='SubjectUserSid'>S-1-5-18</Data><Data Name='SubjectUserName'>SYSTEM</Data><Data Name='SubjectDomainName'>NT AUTHORITY</Data><Data Name='SubjectLogonId'>0x3e7</Data><Data Name='PrivilegeList'>SeAssignPrimaryTokenPrivilege\n\t\t\tSeTcbPrivilege\n\t\t\tSeSecurityPrivilege\n\t\t\tSeTakeOwnershipPrivilege\n\t\t\tSeLoadDriverPrivilege\n\t\t\tSeBackupPrivilege\n\t\t\tSeRestorePrivilege\n\t\t\tSeDebugPrivilege\n\t\t\tSeAuditPrivilege\n\t\t\tSeSystemEnvironmentPrivilege\n\t\t\tSeImpersonatePrivilege\n\t\t\tSeDelegateSessionUserImpersonatePrivilege</Data></EventData><RenderingInfo Culture='en-US'><Message>Special privileges assigned to new logon.\n\nSubject:\n\tSecurity ID:\t\tS-1-5-18\n\tAccount Name:\t\tSYSTEM\n\tAccount Domain:\t\tNT AUTHORITY\n\tLogon ID:\t\t0x3E7\n\nPrivileges:\t\tSeAssignPrimaryTokenPrivilege\n\t\t\tSeTcbPrivilege\n\t\t\tSeSecurityPrivilege\n\t\t\tSeTakeOwnershipPrivilege\n\t\t\tSeLoadDriverPrivilege\n\t\t\tSeBackupPrivilege\n\t\t\tSeRestorePrivilege\n\t\t\tSeDebugPrivilege\n\t\t\tSeAuditPrivilege\n\t\t\tSeSystemEnvironmentPrivilege\n\t\t\tSeImpersonatePrivilege\n\t\t\tSeDelegateSessionUserImpersonatePrivilege</Message><Level>Information</Level><Task>Special Logon</Task><Opcode>Info</Opcode><Channel>Security</Channel><Provider>Microsoft Windows security auditing.</Provider><Keywords><Keyword>Audit Success</Keyword></Keywords></RenderingInfo></Event>" } }
将产生以下输出
{ "event": { "original": "<Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'><System><Provider Name='Microsoft-Windows-Security-Auditing' Guid='{54849625-5478-4994-a5ba-3e3b0328c30d}'/><EventID>4672</EventID><Version>0</Version><Level>0</Level><Task>12548</Task><Opcode>0</Opcode><Keywords>0x8020000000000000</Keywords><TimeCreated SystemTime='2021-03-23T09:56:13.137310000Z'/><EventRecordID>11303</EventRecordID><Correlation ActivityID='{ffb23523-1f32-0000-c335-b2ff321fd701}'/><Execution ProcessID='652' ThreadID='4660'/><Channel>Security</Channel><Computer>vagrant</Computer><Security/></System><EventData><Data Name='SubjectUserSid'>S-1-5-18</Data><Data Name='SubjectUserName'>SYSTEM</Data><Data Name='SubjectDomainName'>NT AUTHORITY</Data><Data Name='SubjectLogonId'>0x3e7</Data><Data Name='PrivilegeList'>SeAssignPrimaryTokenPrivilege\n\t\t\tSeTcbPrivilege\n\t\t\tSeSecurityPrivilege\n\t\t\tSeTakeOwnershipPrivilege\n\t\t\tSeLoadDriverPrivilege\n\t\t\tSeBackupPrivilege\n\t\t\tSeRestorePrivilege\n\t\t\tSeDebugPrivilege\n\t\t\tSeAuditPrivilege\n\t\t\tSeSystemEnvironmentPrivilege\n\t\t\tSeImpersonatePrivilege\n\t\t\tSeDelegateSessionUserImpersonatePrivilege</Data></EventData><RenderingInfo Culture='en-US'><Message>Special privileges assigned to new logon.\n\nSubject:\n\tSecurity ID:\t\tS-1-5-18\n\tAccount Name:\t\tSYSTEM\n\tAccount Domain:\t\tNT AUTHORITY\n\tLogon ID:\t\t0x3E7\n\nPrivileges:\t\tSeAssignPrimaryTokenPrivilege\n\t\t\tSeTcbPrivilege\n\t\t\tSeSecurityPrivilege\n\t\t\tSeTakeOwnershipPrivilege\n\t\t\tSeLoadDriverPrivilege\n\t\t\tSeBackupPrivilege\n\t\t\tSeRestorePrivilege\n\t\t\tSeDebugPrivilege\n\t\t\tSeAuditPrivilege\n\t\t\tSeSystemEnvironmentPrivilege\n\t\t\tSeImpersonatePrivilege\n\t\t\tSeDelegateSessionUserImpersonatePrivilege</Message><Level>Information</Level><Task>Special Logon</Task><Opcode>Info</Opcode><Channel>Security</Channel><Provider>Microsoft Windows security auditing.</Provider><Keywords><Keyword>Audit Success</Keyword></Keywords></RenderingInfo></Event>", "action": "Special Logon", "code": "4672", "kind": "event", "outcome": "success", "provider": "Microsoft-Windows-Security-Auditing", }, "host": { "name": "vagrant", }, "log": { "level": "information", }, "winlog": { "channel": "Security", "outcome": "success", "activity_id": "{ffb23523-1f32-0000-c335-b2ff321fd701}", "level": "information", "event_id": 4672, "provider_name": "Microsoft-Windows-Security-Auditing", "record_id": 11303, "computer_name": "vagrant", "keywords_raw": 9232379236109516800, "opcode": "Info", "provider_guid": "{54849625-5478-4994-a5ba-3e3b0328c30d}", "event_data": { "SubjectUserSid": "S-1-5-18", "SubjectUserName": "SYSTEM", "SubjectDomainName": "NT AUTHORITY", "SubjectLogonId": "0x3e7", "PrivilegeList": "SeAssignPrimaryTokenPrivilege\n\t\t\tSeTcbPrivilege\n\t\t\tSeSecurityPrivilege\n\t\t\tSeTakeOwnershipPrivilege\n\t\t\tSeLoadDriverPrivilege\n\t\t\tSeBackupPrivilege\n\t\t\tSeRestorePrivilege\n\t\t\tSeDebugPrivilege\n\t\t\tSeAuditPrivilege\n\t\t\tSeSystemEnvironmentPrivilege\n\t\t\tSeImpersonatePrivilege\n\t\t\tSeDelegateSessionUserImpersonatePrivilege" }, "task": "Special Logon", "keywords": [ "Audit Success" ], "message": "Special privileges assigned to new logon.\n\nSubject:\n\tSecurity ID:\t\tS-1-5-18\n\tAccount Name:\t\tSYSTEM\n\tAccount Domain:\t\tNT AUTHORITY\n\tLogon ID:\t\t0x3E7\n\nPrivileges:\t\tSeAssignPrimaryTokenPrivilege\n\t\t\tSeTcbPrivilege\n\t\t\tSeSecurityPrivilege\n\t\t\tSeTakeOwnershipPrivilege\n\t\t\tSeLoadDriverPrivilege\n\t\t\tSeBackupPrivilege\n\t\t\tSeRestorePrivilege\n\t\t\tSeDebugPrivilege\n\t\t\tSeAuditPrivilege\n\t\t\tSeSystemEnvironmentPrivilege\n\t\t\tSeImpersonatePrivilege\n\t\t\tSeDelegateSessionUserImpersonatePrivilege", "process": { "pid": 652, "thread": { "id": 4660 } } } }
有关支持的条件列表,请参阅条件。
配置设置
编辑Elastic Agent 处理器在摄取管道之前执行,这意味着您的处理器配置不能引用由摄取管道或 Logstash 创建的字段。有关更多限制,请参阅使用处理器有哪些限制?
名称 | 必需 | 默认值 | 描述 |
---|---|---|---|
|
是 |
|
包含 XML 的源字段。 |
|
是 |
|
解码后的 XML 将写入的字段。要将解码后的 XML 字段合并到事件的根目录,请使用空字符串 ( |
|
否 |
|
是否使用解码后的 XML 对象中的键覆盖事件中已存在的键。 |
|
否 |
|
是否在可能的情况下映射额外的 ECS 字段。请注意,ECS 字段键放置在 |
|
否 |
|
如果指定的字段不存在,是否返回错误。 |
|
否 |
|
是否忽略处理器产生的所有错误。 |
字段映射
编辑字段映射如下
事件字段 | 源 XML 元素 | 备注 |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
每个 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
如果设置了位 0x20000000000000,则为“成功”;如果设置了 0x10000000000000,则为“失败” |
|
|
转换为小写 |
|
|
删除换行符 |
|
|
|
|
|
|
|
|
|
|
|
从整数转换为字符串 |
|
|
映射,其中 Data 元素中的 |
|
|
映射,其中 Data 元素中的 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
如果启用 map_ecs_fields
,则还会执行以下字段映射
事件字段 | 源 XML 或其他字段 | 备注 |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|