我正在尝试使用 Fluentd 从多个服务器(部署在云环境中)收集系统日志/事件日志。Fluentd 充当日志收集器,然后将它们发送到 SIEM 工具 IBM Qradar。
我的问题是当日志到达 IBM Qradar 时,它将日志源视为 Fluentd 收集器主机名。我想拥有原始服务器主机名。
这就是 IBM Qradar 从 Fluentd 接收当前日志的方式。(LOGCOLSRV 是 fluentd 服务器,DBMONSRV 是日志源名称)
<13>Apr 16 20:44:12 **LOGCOLSRV** fluentd: **host:DBMONSRV** ident:sshd pid:14178 message:pam_unix(sshd:session): session closed for user testperfmon client_addr:10.152.112.22
这就是我希望 IBM Qradar 接收它的方式。
<13>Apr 16 20:44:12 **DBMONSRV** fluentd: host:DBMONSRV ident:sshd pid:14178 message:pam_unix(sshd:session): session closed for user testperfmon client_addr:10.152.112.22
以下是 Fluentd 收集器的配置文件。
<source>
type syslog
port 5140
bind 0.0.0.0
source_address_key client_addr
source_hostname_key "hostsource"
tag rsyslog
</source>
<match rsyslog.**>
@type copy
<store>
@type remote_syslog
host 10.152.152.152
port 514
protocol tcp
enable_ruby true
hostname "#{Socket.gethostname}"
packet_size 4096
program fluentd
<format>
@type single_value
message_key message
</format>
</store>
</match>
我尝试使用<code>"#{Socket.gethostname}" </code>
,但它仍然给出了 Fluentd 的主机名,而不是原始日志源主机名。
请帮忙。