收集 IBM WebSphere Application Server 日志
本文档介绍了如何使用 Bindplane 代理将 IBM WebSphere Application Server 日志注入 Google Security Operations。
IBM WebSphere Application Server 是一种 Java EE 应用服务器,可生成系统、安全审核和访问日志。解析器会将这些日志映射到统一数据模型 (UDM),提取进程详细信息、用户信息、事件时间戳和文件元数据。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例
- Windows Server 2016 或更高版本,或者具有
systemd的 Linux 主机 - Bindplane 代理与 IBM WebSphere Application Server 之间的网络连接
- 如果通过代理运行,请确保防火墙端口根据 Bindplane 代理要求处于打开状态
- 对 IBM WebSphere Application Server 的管理访问权限
获取 Google SecOps 注入身份验证文件
- 登录 Google SecOps 控制台。
- 前往 SIEM 设置 > 收集代理。
- 下载数据注入身份验证文件。
将该文件安全地保存在将安装 Bindplane 的系统上。
获取 Google SecOps 客户 ID
- 登录 Google SecOps 控制台。
- 前往 SIEM 设置 > 个人资料。
从组织详细信息 部分复制并保存客户 ID 。
安装 Bindplane 代理
按照以下说明在 Windows 或 Linux 操作系统上安装 Bindplane 代理。
Windows 安装
- 以管理员身份打开命令提示符 或 PowerShell 。
运行以下命令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet等待安装完成。
运行以下命令,验证安装是否成功:
sc query observiq-otel-collector该服务应显示为正在运行 。
Linux 安装
- 打开具有根权限或 sudo 权限的终端。
运行以下命令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh等待安装完成。
运行以下命令,验证安装是否成功:
sudo systemctl status observiq-otel-collector该服务应显示为活跃 (正在运行) 。
其他安装资源
如需了解其他安装选项和问题排查,请参阅 Bindplane 代理安装指南。
配置 Bindplane 代理以注入日志并发送到 Google SecOps
找到配置文件
Linux :
sudo nano /opt/observiq-otel-collector/config.yamlWindows :
notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
修改配置文件
将
config.yaml的全部内容替换为以下配置:receivers: filelog: include: - /opt/IBM/WebSphere/AppServer/profiles/*/logs/*/SystemOut.log - /opt/IBM/WebSphere/AppServer/profiles/*/logs/*/SystemErr.log start_at: beginning exporters: chronicle/websphere: compression: gzip creds_file_path: '/etc/bindplane-agent/ingestion-auth.json' customer_id: '<customer_id>' endpoint: malachiteingestion-pa.googleapis.com log_type: IBM_WEBSPHERE_APP_SERVER raw_log_field: body ingestion_labels: env: production service: pipelines: logs/websphere_to_chronicle: receivers: - filelog exporters: - chronicle/websphere
配置参数
替换以下占位符:
接收器配置:
filelog:用于从磁盘收集日志文件的接收器类型include:要监控的文件路径列表。默认 WebSphere 日志位置:- Linux:
/opt/IBM/WebSphere/AppServer/profiles/<PROFILE>/logs/<SERVER>/SystemOut.log - Windows:
C:\IBM\WebSphere\AppServer\profiles\<PROFILE>\logs\<SERVER>\SystemOut.log
- Linux:
start_at:设置为beginning以读取现有日志,或设置为end以仅读取新条目
导出器配置:
websphere:导出器的描述性名称creds_file_path:注入身份验证文件的完整路径:- Linux:
/etc/bindplane-agent/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
<customer_id>:上一步中的客户 IDendpoint:区域级端点网址:- 美国:
malachiteingestion-pa.googleapis.com - 欧洲:
europe-malachiteingestion-pa.googleapis.com - 亚洲:
asia-southeast1-malachiteingestion-pa.googleapis.com - 如需查看完整列表,请参阅区域级端点
- 美国:
IBM_WEBSPHERE_APP_SERVER:日志类型,与在 Chronicle 中显示的内容完全一致ingestion_labels:YAML 格式的可选标签(例如,env: production)
流水线配置:
websphere_to_chronicle:流水线的描述性名称
保存配置文件
- 修改后,保存文件:
- Linux:按
Ctrl+O,然后按Enter,再按Ctrl+X - Windows:依次点击文件 > 保存
- Linux:按
重启 Bindplane 代理以应用更改
如需在 Linux 中重启 Bindplane 代理,请运行以下命令:
sudo systemctl restart observiq-otel-collector验证服务正在运行:
sudo systemctl status observiq-otel-collector检查日志中的错误:
sudo journalctl -u observiq-otel-collector -f
如需在 Windows 中重启 Bindplane 代理,请选择以下选项之一:
以管理员身份运行命令提示符或 PowerShell:
net stop observiq-otel-collector && net start observiq-otel-collector“服务”控制台:
- 按
Win+R,输入services.msc,然后按 Enter 键。 - 找到 observIQ OpenTelemetry Collector 。
- 右键点击并选择重启 。
验证服务正在运行:
sc query observiq-otel-collector检查日志中的错误:
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
- 按
配置 IBM WebSphere Application Server 日志记录
- 登录 IBM WebSphere Application Server 管理控制台。
- 前往问题排查 > 日志和跟踪。
- 选择服务器(例如,
server1)。 - 点击诊断跟踪 以配置跟踪日志记录级别,或点击 JVM 日志 以配置 SystemOut 和 SystemErr 日志设置。
- 在 JVM 日志 下,验证以下设置:
- System.out 日志文件名:
${SERVER_LOG_ROOT}/SystemOut.log - System.err 日志文件名:
${SERVER_LOG_ROOT}/SystemErr.log - 日志轮换:配置日志轮换(例如,按文件大小或时间),以防止日志文件无限增长。
- System.out 日志文件名:
- 点击应用 ,然后点击保存 以保存配置。
- 找出 WebSphere 服务器上的日志目录。默认位置包括:
<WAS_HOME>/profiles/<PROFILE>/logs/<SERVER>/SystemOut.log<WAS_HOME>/profiles/<PROFILE>/logs/<SERVER>/SystemErr.log<WAS_HOME>/profiles/<PROFILE>/logs/<SERVER>/BinaryAudit*(安全审计日志,如果已启用审计)
确保
config.yaml中的 Bindplane 代理include路径与 WebSphere 服务器上的实际日志文件位置一致。
UDM 映射表
| 日志字段 | UDM 映射 | 逻辑 |
|---|---|---|
| number、MemCount、JMSMessageID | 其他 | 合并为每个字段的键值对 |
| TrgAction、description | metadata.description | 如果 TrgAction 不为空,则取 TrgAction 中的值,否则取 description 中的值 |
| 时间 | metadata.event_timestamp | 使用日期过滤条件进行解析,格式为 MM/dd/yy HH:mm:ss.SSS Z、M/dd/yy H:mm:ss.SSS Z、UNIX_MS |
| metadata.event_type | 设置为“GENERIC_EVENT” | |
| 操作 | metadata.product_event_type | 直接复制值 |
| product_log_id | metadata.product_log_id | 直接复制值 |
| 版本 | metadata.product_version | 直接复制值 |
| 产品 | metadata.product_name | 直接复制值 |
| 供应商 | metadata.vendor_name | 直接复制值 |
| file_name | target.file.full_path | 直接复制值 |
| 命令 | target.process.command_line | 直接复制值 |
| filename | target.process.file.full_path | 直接复制值 |
| 成员 | target.user.group_identifiers | 从经过处理的 Members 数组合并 |
| 开斋节 (E) | target.user.product_object_id | 直接复制值 |
| 个人资料 | target.user.user_display_name | 直接复制值 |
principal_user |
event.idm.read_only_udm.principal.user.userid |
从更改日志映射 |
exception_code |
event.idm.read_only_udm.security_result.detection_fields |
从更改日志映射 |
exception_class |
event.idm.read_only_udm.security_result.detection_fields |
从更改日志映射 |
source_line |
event.idm.read_only_udm.additional.fields |
从更改日志映射 |
length |
event.idm.read_only_udm.additional.fields |
从更改日志映射 |
websphere_java_version |
event.idm.read_only_udm.additional.fields |
从更改日志映射 |
websphere_platform_details |
event.idm.read_only_udm.additional.fields |
从更改日志映射 |
java_compiler |
event.idm.read_only_udm.additional.fields |
从更改日志映射 |
java_vm_name |
event.idm.read_only_udm.additional.fields |
从更改日志映射 |
parent_context |
event.idm.read_only_udm.additional.fields |
从更改日志映射 |
event_context |
event.idm.read_only_udm.additional.fields |
从更改日志映射 |
method_name |
event.idm.read_only_udm.additional.fields |
从更改日志映射 |
principal_application |
event.idm.read_only_udm.principal.application |
从更改日志映射 |
os_version |
event.idm.read_only_udm.principal.asset.platform_software.platform_version |
从更改日志映射 |
os_name |
event.idm.read_only_udm.principal.asset.platform_software.platform_patch_level |
从更改日志映射 |
process_name |
event.idm.read_only_udm.principal.resource.name |
从更改日志映射 |
full_orb_version |
event.idm.read_only_udm.security_result.detection_fields |
从更改日志映射 |
target_application |
event.idm.read_only_udm.target.application |
从更改日志映射 |
更新日志
需要更多帮助?获得社区成员和 Google SecOps 专业人士的解答。