FortiSwitch
FortiSwitch: secure, simple and scalable Ethernet solutions
vsiva
Staff
Staff
Article Id 191712
Description
This article describes how to enable logs for specific filters.

Solution
1) Generally, logs can be viewed from from FortiSwitch using '# execute log display'.
FSW # execute log display
596 logs found.                                                     
1 logs returned.

1: 2020-12-16 18:01:42 log_id=0103032001 type=event subtype=system pri=information vd=root user="admin" ui=ssh(40.40.40.40)
2) Number of viewed logs can be increased by setting up the 'view-line' attribute.                                            
FSW # execute  log  filter view-lines 500
Now executing '# execute log display' will return 500 logs.

3) Logs can also be viewed with desired custom filters on the FortiSwitch. This can be done by using '# execute log filter field' command.

Example to monitor the port status:
FSW # execute log filter field status up, down
FSW # execute log display
1: 1970-01-03 15:12:29 log_id=0100001401 type=event subtype=link pri=information vd=root unit="primary" switch.physical-port="port47" status="down" msg="primary switch port port47 has gone down"
Similarly to view spanning-tree logs, '# execute  log filter  field subtype spanning_tree' can be used.

Below is the list of applicable filters:



Contributors