conf vdom
edit root
diagnose sniffer packet any "host <IP_1> and icmp" 4
diagnose sniffer packet any "host <IP_1> and host <IP_2>" 4
diagnose sniffer packet internal 'src host <IP_1> and dst host <IP_2>' 4
1: print header of packets
2: print header and data from ip of packets
3: print header and data from ethernet of packets (if available)
4: print header of packets with interface name
5: print header and data from ip of packets with interface name
6: print header and data from ethernet of packets (if available) with intf name
https://docs.fortinet.com/document/fortiadc/7.0.0/cli-reference/395933/diagnose-sniffer-packet