事件日志(审核日志)
事件日志介绍
当用户在 Apstra 环境中工作时,他们的操作会被记录下来。在调查常规使用情况、网络中断和可能的可疑活动时,这些事件日志非常有用。有关收集的信息,请参阅下文。
记录的事件类型
将记录以下事件类型的事件:
事件 |
描述 |
---|---|
登录 |
用户已登录(成功和失败)。 |
注销 |
用户已注销。 |
蓝图提交 |
更改已从暂存蓝图应用到活动蓝图。 |
蓝图还原 |
暂存蓝图中的更改将被丢弃。 |
蓝图回滚 |
暂存蓝图已回滚到以前的版本。 |
蓝图删除 |
整个蓝图已删除。 |
设备配置更改 |
设备的配置已更改。这包括 Apstra 推送到任何托管设备(包括 Time Voyager)的任何配置更改。该事件归因于进行更改的登录用户。 |
操作模式更改为维护 |
用户已将蓝图操作模式更改为维护。 |
Operaton模式更改为正常 |
蓝图操作模式已由用户更改为正常,或者在磁盘使用情况和内存低于利用率阈值时由系统更改为正常(操作处于读/写模式)。 |
操作模式更改为只读 |
蓝图操作模式已由用户更改为只读,或者在超过利用率阈值时由系统更改为只读(操作处于只读模式)。 |
速率限制异常添加 |
添加了速率限制例外。 |
速率限制异常删除 |
删除了速率限制例外。 |
速率限制清除 |
已清除速率限制。 |
系统日志创建 |
系统日志已创建。 |
系统日志更新 |
系统日志已更新。 |
系统日志删除 |
系统日志已删除。 |
用户创建 |
已创建用户配置文件(通过创建或克隆)。 |
用户更新 |
用户配置文件已更新。 |
用户删除 |
已删除用户配置文件。 |
AuthAclEnable |
访问控制规则已启用。 |
AuthAClDisable |
访问控制规则已禁用。 |
AuthAclRuleAdd |
添加了访问控制规则。 |
AuthAclRuleUpdate |
访问控制规则已更新。 |
AuthAclRuleDelete |
已删除访问控制规则。 |
收集的事件详细信息的类型
为每个事件记录以下详细信息(如果适用):
财产 |
描述 |
---|---|
时间范围 |
事件发生的时间范围(将鼠标悬停在时间字段上以查看日期和时间)。 |
用户 |
执行活动的用户、 系统 或用户名(如 admin)。 |
用户 IP 地址 |
与进行更改的用户关联的 IP 地址。 |
类型(事件) |
事件的类型(如上表中所列)。 |
蓝图名称(蓝图 ID) |
进行更改的蓝图的 ID。 |
蓝图提交消息 |
已提交到蓝图的更改的说明(如果提供)。 |
设备密钥(设备 ID) |
通常为进行更改的受管设备的序列号。 |
设备配置 |
推送并应用到设备的配置。 |
结果 |
活动的结果。成功意味着系统接受操作。如果出现错误,则会包含错误字符串(例如,未经授权)。 |
搜索事件日志
将事件日志导出为 CSV 文件
- 从左侧导航菜单中,导航到平台>事件日志,然后单击导出为 CSV(右上角)。
- 若要筛选要导出的数据,请输入查询。
- 单击另存为 CSV 文件以下载 CSV 文件。
将事件日志发送到外部系统日志服务器
有关使用 Syslog 协议将事件日志发送到外部系统的详细信息,请参阅 系统日志配置。
解析 Apstra 日志
Apstra 使用通用事件格式 (CEF),这是一种用于事件或日志生成设备和应用程序互操作性的标准。该标准定义了日志记录的语法。它包括一个标准前缀和一个格式化为键值对的变量扩展。
Apstra 日志格式
'{timestamp} {host} ' 'CEF:{version}|{device_vendor}|{device_product}|{device_version}|' '{device_event_class_id}|{name}|{severity}|{extension}
哪里:
-
version
始终为“0” -
device_vendor
始终为“Apstra” -
device_product
始终为“Apstra” -
device_version
是当前的 Apstra 版本 -
device_event_class_id
审核日志为“100”,异常日志为“101” -
name
对于审核日志,始终为“审核偶数”,对于异常日志始终为“警报” -
severity
对于审核日志始终为“中”,对于异常日志始终为“非常高”
其中:
-
{扩展名} 为:
-
对于异常日志:msg=<json 有效负载>
-
对于审核日志:cat=<activity> src=<src_IP> suser=<username> act=<activity result> cs1Label=<field1_type> cs1=<field1_value>cs2Label=<field2_type> cs2=<field2_value> cs3Label=<field2_type> cs2=<field2_value>
-
审核日志字段
田 | 描述 | 适用于 |
猫 | 执行的活动。有效值:“登录”、“注销”、“蓝图提交”、“设备配置更改”、“蓝图删除”。 | 所有消息 |
SRC | 发出 HTTP 请求的客户端的源 IP | 所有消息 |
用户 | 谁执行了活动 | 所有消息 |
做 | 活动的结果 - 自由格式字符串。“成功”是指系统接受操作。如果出现错误,请包含错误字符串。例如:未经授权 | 所有消息 |
cs1标签 | 字符串“蓝图名称” | cat = “BlueprintCommit” 或 “BlueprintDelete” |
CS1 | 已对其采取措施的蓝图的名称。 | cat = “BlueprintCommit” 或 “BlueprintDelete” |
cs2标签 | 字符串“蓝图 ID” | cat = “BlueprintCommit” 或 “BlueprintDelete” |
CS2 | 对其采取措施的蓝图的 ID。 | cat = “BlueprintCommit” 或 “BlueprintDelete” |
cs3标签 | 字符串“提交消息”。仅当用户添加了提交消息时才存在(可选) | cat = “BlueprintCommit” 或 “BlueprintDelete” |
CS3 | 提交消息。仅当用户添加了提交消息时才存在(可选) | Cat = “蓝图提交” |
设备外部标识 | 已对其执行操作的受管设备的 ID(通常为序列号)。 | Cat = “DeviceConfigChange” |
设备配置 | 在设备上推送和应用的配置,其中“#012”用于向日志收集器和解析器指示换行符。 | Cat = “DeviceConfigChange” |
异常 JSON 字段
田 | 描述 | 适用于 |
你blueprint_label” | 字符串。引发异常的蓝图的名称。 | 所有消息 |
u'timestamp' | 字符串。引发异常的蓝图的名称。 | 所有消息 |
你origin_name | 字符串。引发异常的蓝图的名称。 | 所有消息 |
你'警报' | 该值是具有实际异常的 JSON 有效负载(请参阅下表) | |
你origin_hostname” | 字符串。异常影响的设备的主机名。 | 所有消息 |
你device_hostname | 字符串。异常影响的设备的主机名。 | 所有消息 |
你origin_role | 字符串。异常影响的设备的主机名。 | 所有消息 |
田 | 描述 | 适用于 |
你first_seen | 字符串。首次引发异常时的 Unix 时间戳。 | 所有消息 |
你'养育' | 永远正确 | 所有消息 |
u'严重性 | 异常的严重性级别。在今天的 Apstra 中,所有异常都会以严重性级别 3 引发。 | 所有消息 |
异常日志示例
IBA 异常 “MLAG 异常”
所有异常的 device_event_class_id = 101
06 04 2020 08:42:50 10.23.59.188 <SLOG:INFO> 1 2020-06-04T13:26:54.195385Z aos-server - - - 2020-06-04T13:26:54.194168+0000 aos-server CEF:0|Apstra|Apstra|3.2.2-12|101|Alert|Very-High|msg={u'blueprint_label': u'LAB', u'timestamp': 1591277214194168, u'origin_name': u'FDO21260P7L', u'alert': {u'first_seen': 1591277214194141, u'raised': True, u'severity': 3, u'mlag_alert': {u'peer_link_status': u'down', u'actual_domain_state': 1, u'mlag_id': 0, u'expected_intf_state': 0, u'hostname': u'USDAL1-LAB93108-LF1', u'peer_link': u'port-channel3', u'expected_peer_link_status': u'up', u'actual_intf_state': 0, u'expected_domain_state': 4, u'ifname': u'', u'domain_id': u'1'}, u'id': u'6656a961-3139-4825-b89d-93f071271891'}, u'origin_hostname': u'LAB1_HOST1', 'device_hostname': 'LAB1_HOST1', u'origin_role': u'leaf'}
IBA 异常“意外主机名”
Jun 8 21:35:25 aos-server - 2020-06-08T21:35:25.757009+0000 aos-server CEF:0|Apstra|Apstra|3.3.0-299|101|Alert|Very-High|msg={u'blueprint_label': u'test', u'timestamp': 1591652125757009, u'origin_name': u'505400C5CAAA', u'alert': {u'first_seen': 1591652125757001, u'raised': True, u'severity': 3, u'hostname_alert': {u'expected_hostname': u'spine1', u'actual_hostname': u'localhost'}, u'id': u'7f693f1d-2aeb-44a4-93f1-656400cfff7e'}, u'origin_hostname': u'localhost', 'device_hostname': 'localhost', u'origin_role': u''}
用户注销和日志记录
所有事件的 device_event_class_id = 100
Jun 8 19:43:33 aos-server - 2020-06-08T19:43:33.392984+0000 aos-server CEF:0|Apstra|Apstra|3.3.0-299|100|Audit event|medium|cat=Logout src=10.1.253.6 suser=admin act=Success Jun 8 19:43:39 aos-server - 2020-06-08T19:43:39.267262+0000 aos-server CEF:0|Apstra|Apstra|3.3.0-299|100|Audit event|medium|cat=Login src=10.1.253.6 suser=admin act=Success
蓝图删除
Jun 8 21:23:41 aos-server - 2020-06-08T21:23:41.426107+0000 aos-server CEF:0|Apstra|Apstra|3.3.0-299|100|Audit event|medium|cat=BlueprintDelete src=10.1.253.6 suser=admin act=Success cs1Label=Blueprint Name cs1=test cs2Label=Blueprint ID cs2=2bd8f38f-9242-461c-855e-8146a4f68bb9
蓝图提交
Jun 8 21:42:19 aos-server - 2020-06-08T21:42:19.550216+0000 aos-server CEF:0|Apstra|Apstra|3.3.0-299|100|Audit event|medium|cat=BlueprintCommit src=10.1.253.6 suser=admin act=Success cs1Label=Blueprint Name cs1=test cs2Label=Blueprint ID cs2=5ba55c14-6c01-4537-9dd7-d32c8c41616b cs3Label=Commit Message cs3=New_Virtual_Network
设备配置更改
恢复整天 0 BP 部署
Jun 8 21:35:27 aos-server - 2020-06-08T21:35:27.132831+0000 aos-server CEF:0|Apstra|Apstra|3.3.0-299|100|Audit event|medium|cat=DeviceConfigChange src=10.1.253.6 suser=admin act=Success deviceExternalId=505400C5CAAA deviceConfig= ... <Device Config, see next table> ...
设备配置
请注意,“#012”用于表示换行符
service interface inactive expose#012 !#012 spanning-tree mode none#012 !#012 hostname spine1#012 interface Ethernet1#012 description facing_l2-virtual-ext-001-leaf1:Ethernet1#012 no switchport#012 ip address 203.0.113.4/31#012 no shutdown#012 description facing_l2-virtual-ext-002-leaf1:Ethernet1/1#012 no switchport#012 ip address 203.0.113.6/31#012 no shutdown#012 exit#012 !#012 interface Ethernet3#012 description facing_l2-virtual-ext-003-leaf1:Ethernet1/1#012 no switchport#012 ip address 203.0.113.8/31#012 no shutdown#012 exit#012!#012 interface Ethernet4#012 description facing_l2-virtual-ext-004-leaf1:Ethernet1#012 no switchport#012 ip address 203.0.113.10/31#012 no shutdown#012 exit#012!#012 interface Ethernet5#012 no switchport#012 no shutdown#012 exit#012 !#012 interface Ethernet6#012 no switchport#012 no shutdown#012 exit#012 !#012 interface Ethernet7#012 no switchport#012 no shutdown#012 exit#012 !#012 ip routing#012!#012 service routing protocols model multi-agent#012 interface loopback 0#012 ip address 203.0.113.20/32#012 exit#012 !#012 ip prefix-list AllPodNetworks seq 5 permit 0.0.0.0/0 le 32#012 ip as-path access-list MyASN permit ^$#012 route-map AllPodNetworks permit 10#012 match ip address prefix-list AllPodNetworks#012 exit#012 !#012 route-map EVPN permit 10#012 set ip next-hop unchanged#012 exit#012 !#012 router bgp 4200000000#012 router-id 203.0.113.20#012 no bgp default ipv4-unicast#012 bgp log-neighbor-changes#012 bgp bestpath as-path multipath-relax#012 redistribute connected route-map AllPodNetworks#012!#012 neighbor l3clos-s peer-group#012 neighbor l3clos-s timers 1 3#012 neighbor l3clos-s soft-reconfiguration inbound#012 neighbor l3clos-s maximum-routes 0 warning-limit 90 percent#012 neighbor l3clos-s-evpn peer-group#012 neighbor l3clos-s-evpn ebgp-multihop 2#012 neighbor l3clos-s-evpn timers 1 3#012 neighbor l3clos-s-evpn send-community extended#012 neighbor l3clos-s-evpn soft-reconfiguration inbound#012 neighbor l3clos-s-evpn update-source loopback0#012 neighbor l3clos-s-evpn maximum-routes 0 warning-limit 90 percent# !#012 !#012 neighbor 203.0.113.0 remote-as 64512#012 neighbor 203.0.113.0 peer-group l3clos-s-evpn#012 neighbor 203.0.113.0 description facing_l2-virtual-ext-001-leaf1-evpn-overlay#012 neighbor 203.0.113.5 remote-as 64512#012 neighbor 203.0.113.5 peer-group l3clos-s#012 neighbor 203.0.113.5 description facing_l2-virtual-ext-001-leaf1#012 neighbor 203.0.113.1 remote-as 64513#012 neighbor 203.0.113.1 peer-group l3clos-s-evpn#012 neighbor 203.0.113.1 description facing_l2-virtual-ext-002-leaf1-evpn-overlay#012 neighbor 203.0.113.7 remote-as 64513#012 neighbor 203.0.113.7 peer-group l3clos-s#012 neighbor 203.0.113.7 description facing_l2-virtual-ext-002-leaf1#012 neighbor 203.0.113.2 remote-as 64514#012 neighbor 203.0.113.2 peer-group l3clos-s-evpn#012 neighbor 203.0.113.2 description facing_l2-virtual-ext-003-leaf1-evpn-overlay#012 neighbor 203.0.113.9 remote-as 64514#012 neighbor 203.0.113.9 peer-group l3clos-s#012 neighbor 203.0.113.9 description facing_l2-virtual-ext-003-leaf1#012 neighbor 203.0.113.3 remote-as 64515#012 neighbor 203.0.113.3 peer-group l3clos-s-evpn#012 neighbor 203.0.113.3 description facing_l2-virtual-ext-004-leaf1-evpn-overlay#012 neighbor 203.0.113.11 remote-as 64515#012 neighbor 203.0.113.11 peer-group l3clos-s#012 neighbor 203.0.113.11 description facing_l2-virtual-ext-004-leaf1#012 address-family evpn#012 neighbor l3clos-s-evpn route-map EVPN out#012 neighbor 203.0.113.0 activate#012 neighbor 203.0.113.1 activate#012 neighbor 203.0.113.2 activate#012 neighbor 203.0.113.3 activate#012 exit#012 address-family ipv4#012 neighbor 203.0.113.11 activate#012 neighbor 203.0.113.5 activate#012 neighbor 203.0.113.7 activate#012 neighbor 203.0.113.9 activate#012 exit#012 maximum-paths 32#012 exit#012