(4) (可选)配置发往日志主机的日志信息的输出格式。
info-center format { cmcc | rfc5424 | sgcc | unicom }
缺省情况下,发往日志主机的日志信息的格式为非定制格式。
本命令中sgcc参数的支持情况与设备型号有关,具体请参见命令参考。
(5) (可选)配置发往日志主机的定位信息中携带设备序列号。
info-center loghost locate-info with-sn
缺省情况下,发往日志主机的日志定位信息中不携带设备序列号。
(6) (可选)配置发送的日志信息的时间戳格式。
info-center timestamp loghost { date [ with-milliseconds ] | iso [ with-milliseconds ] | no-year-date | none }
缺省情况下,发往日志主机的日志信息的时间戳输出格式为date格式。
暂无评论
核心结论:L5030 负载均衡业务日志(LB)没有内置 sgcc 国网格式,只有安全策略 / IPS 支持 sgcc 快速日志;系统 syslog 的 info-center sgcc 只处理设备系统日志,不能把 LB 业务流量日志转成国网 1084 字段结构H3C。
国网 1084 号安管平台要求:固定字段顺序、携带设备 SN、设备类型、时间戳(带毫秒)、源 / 目的 IP、端口、协议、动作等固定字段,默认标准 syslog 字段缺失 / 顺序不对,平台不认。
info-center format sgcc,输出国网格式系统日志;负载均衡业务日志不走这个 sgcc。system-view
# 全局系统日志为国网SGCC格式
info-center format sgcc
# 时间戳带毫秒,国网必选
info-center timestamp loghost date with-milliseconds
# 日志携带设备SN
info-center loghost locate-info with-sn
# 配置安管平台syslog服务器
info-center loghost 【国网平台IP】
限制:LB 负载均衡业务日志不跟随 info-center sgcc,这条只能解决设备本身运维日志,不能解决业务访问日志。
security-policy / ips 支持 sgcc 关键字,直接输出国网格式;设备继续输出 LB 标准 customlog 快速日志,在国网安管平台采集器 / 前置机上做字段映射:
优点:不用升级固件、无业务风险;缺点:需要在安管前置机做解析模板,需要国网平台厂商配合。
如果安管平台只需要安全策略日志,不需要 LB 业务调度日志:
system-view
customlog format packet-filter
customlog host v2 【国网前置IP】 port 【端口】
customlog character-encoding gb18030
[customlog-host-xxx]
module security-policy sgcc
module security-policy-config sgcc
⚠️ 仅安全策略,负载均衡调度日志(server-lb、链路 LB)无法 sgcc。
缺点:周期长,需要版本合入,临时不能上线。
info-center format sgcc 即可满足;
暂无评论
#1 开启快速日志全局开关 system-view customlog enable #2 时间戳(1084要求UTC+8,yyyy-MM-ddTHH:mm:ss格式) customlog timestamp local time-format iso #3 字符集,国网平台一般utf-8 customlog character-encoding utf-8 #4 核心:按1084附录字段编写format模板,示例(按需增减字段) #模板语法:$字段,如$timestamp $devname $srcip $dstip $eventtype等,参考H3C V7 customlog变量手册 customlog format "$timestamp|$sysname|$srcip|$srcport|$dstip|$dstport|$event|$severity|$reason" #5 指定日志接收服务器(国网安全平台采集地址,UDP/TCP) customlog host 10.x.x.x port 514 customlog host source Vlan-interfaceX
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论