收集 A10 网络负载平衡器日志
支持的语言:
Google SecOps
SIEM
本文档介绍了如何使用 Bindplane 代理将 A10 网络负载平衡器日志导出到 Google Security Operations。解析器首先使用 grok
模式提取相关字段。然后,它会利用条件语句 (if
) 根据提取字段的存在情况和内容将其映射到统一数据模型 (UDM),最终对事件类型进行分类。
准备工作
- 确保您拥有 Google SecOps 实例。
- 确保您使用的是 Windows 2016 或更高版本,或者具有
systemd
的 Linux 主机。 - 如果通过代理运行,请确保防火墙端口处于开放状态。
- 确保您拥有对 A10 负载平衡器的特权访问权限。
获取 Google SecOps 注入身份验证文件
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 收集代理。
- 下载注入身份验证文件。将文件安全地保存在将要安装 Bindplane 的系统上。
获取 Google SecOps 客户 ID
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 配置文件。
- 复制并保存组织详细信息部分中的客户 ID。
安装 Bindplane 代理
Windows 安装
- 以管理员身份打开命令提示符或 PowerShell。
运行以下命令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
Linux 安装
- 打开具有 root 或 sudo 权限的终端。
运行以下命令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
其他安装资源
- 如需了解其他安装选项,请参阅此安装指南。
配置 Bindplane 代理以注入 Syslog 并将其发送到 Google SecOps
访问配置文件:
- 找到
config.yaml
文件。通常,它位于 Linux 上的/etc/bindplane-agent/
目录中或 Windows 上的安装目录中。 - 使用文本编辑器(例如
nano
、vi
或记事本)打开该文件。
- 找到
按如下方式修改
config.yaml
文件:receivers: udplog: # Replace the port and IP address as required listen_address: "0.0.0.0:514" exporters: chronicle/chronicle_w_labels: compression: gzip # Adjust the path to the credentials file you downloaded in Step 1 creds: '/path/to/ingestion-authentication-file.json' # Replace with your actual customer ID from Step 2 customer_id: <customer_id> endpoint: malachiteingestion-pa.googleapis.com # Add optional ingestion labels for better organization ingestion_labels: log_type: A10_LOAD_BALANCER raw_log_field: body service: pipelines: logs/source0__chronicle_w_labels-0: receivers: - udplog exporters: - chronicle/chronicle_w_labels
根据基础架构的需要替换端口和 IP 地址。
将
<customer_id>
替换为实际的客户 ID。将
/path/to/ingestion-authentication-file.json
更新为获取 Google SecOps 提取身份验证文件部分中保存身份验证文件的路径。
重启 Bindplane 代理以应用更改
如需在 Linux 中重启 Bindplane 代理,请运行以下命令:
sudo systemctl restart bindplane-agent
如需在 Windows 中重启 Bindplane 代理,您可以使用服务控制台,也可以输入以下命令:
net stop BindPlaneAgent && net start BindPlaneAgent
在 A10 负载平衡器中配置 Syslog 服务器
- 使用 SSH 客户端建立与 A10 负载平衡器的 SSH 连接。
运行以下命令,进入配置模式:
config
使用以下命令配置远程 syslog 服务器:
logging host <bindplane-server-ip> <port-number>
- 将
<bindplane-server-ip>
替换为 Bindplane IP 地址,并将<port-number>
替换为在 Bindplane 中配置的 IP 地址;例如,514
。
- 将
如需设置严重程度,请使用以下命令:
logging level information
- 这会将参考性消息(例如警告和错误)发送到 Bindplane 代理。
运行以下命令,确保已启用 syslog 日志记录:
logging enable
保存配置,以确保在重新启动后配置保持不变:
write memory
完整的 CLI 配置示例:
config logging host 192.168.1.100 514 logging level info logging enable write memory
UDM 映射表
日志字段 | UDM 映射 | 逻辑 |
---|---|---|
dns | additional.fields.dns.value.string_value | 该值取自 grok 模式提取的 dns 字段。 |
dns_server | additional.fields.dns_server.value.string_value | 该值取自 grok 模式提取的 dns_server 字段。 |
gslb | additional.fields.gslb.value.string_value | 该值取自 grok 模式提取的 gslb 字段。 |
host_name | principal.hostname principal.asset.hostname |
该值取自 grok 模式提取的 host_name 字段。 |
httpmethod | network.http.method | 该值取自 grok 模式提取的 httpmethod 字段。 |
partion_id | additional.fields.partion_id.value.string_value | 该值取自 grok 模式提取的 partion_id 字段。 |
prin_ip | principal.ip principal.asset.ip |
该值取自 grok 模式提取的 prin_ip 字段。 |
prin_mac | principal.mac | 该值取自通过 grok 模式提取的 prin_mac 字段,并移除了点,每两个字符插入一个英文冒号。 |
prin_port | principal.port | 该值取自 grok 模式提取的 prin_port 字段,并转换为整数。 |
proto | network.ip_protocol | 该值取自 grok 模式提取的 proto 字段。如果 message 字段包含 UDP ,则该值设置为 UDP 。 |
sessionid | network.session_id | 该值取自 grok 模式提取的 sessionid 字段。 |
status_code | network.http.response_code | 该值取自 grok 模式提取的 status_code 字段,并转换为整数。 |
tar_ip | target.ip target.asset.ip |
该值取自 grok 模式提取的 tar_ip 字段。 |
tar_mac | target.mac | 该值取自通过 grok 模式提取的 tar_mac 字段,并移除了点,每两个字符插入一个英文冒号。 |
tar_port | target.port | 该值取自 grok 模式提取的 tar_port 字段,并转换为整数。 |
时间 | metadata.event_timestamp.seconds | 该值通过 grok 模式从提取的 time 字段中解析得出,使用多种可能的日期格式。 |
网址 | target.url | 该值取自 grok 模式提取的 url 字段。 |
用户 | principal.user.userid | 该值取自 grok 模式提取的 user 字段。 |
不适用 | metadata.event_type | 由解析器逻辑根据主账号和目标信息的存在情况确定: - NETWORK_CONNECTION :如果主账号和目标信息都存在。- STATUS_UPDATE :如果仅存在主账号信息。- GENERIC_EVENT :否则。 |
不适用 | metadata.log_type | 硬编码为 A10_LOAD_BALANCER 。 |
不适用 | network.application_protocol | 如果 proto 字段为 HTTP ,则设置为 HTTP 。 |
需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。