我正在尝试使用 wazuh 4.x 中的子解码器解析如下所示的日志,由于某种原因它没有解析所需的字段
日志条目
ossec: output: 'domainjoin-cli query|grep -i Domain': Domain = mydomain.local
儿童解码器
<decoder name="ossec-domain">
<parent>ossec</parent>
<type>ossec</type>
<prematch>^ossec: output:</prematch>
<regex type="pcre2">^'domainjoin-cli[ \t]query|grep[ \t]-i[ \t]Domain':[ \t]Domain[ \t]=[ \t](\S+)</regex>
<order>domain</order>
</decoder>
输出
ossec: output: 'domainjoin-cli query|grep -i Domain': Domain = mydomain.local
**Phase 1: Completed pre-decoding.
full event: 'ossec: output: 'domainjoin-cli query|grep -i Domain': Domain = mydomain.local'
**Phase 2: Completed decoding.
name: 'ossec'
parent: 'ossec'
**Phase 3: Completed filtering (rules).
id: '100008'
level: '3'
description: 'Server is in domain '
groups: '['ossec']'
firedtimes: '1'
hipaa: '['164.312.b']'
mail: 'False'
pci_dss: '['10.6.1']'
**Alert to be generated.