问题描述
我正在尝试使用 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 的主机名,而不是原始日志源主机名。
请帮忙。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)