1) To monitor a specific interface
set forwarding-options analyzer MIRROR input ingress interface ge-1/0/7.0
set forwarding-options analyzer MIRROR input egress interface ge-1/0/7.0
set forwarding-options analyzer MIRROR input ingress interface ae10.0
set forwarding-options analyzer MIRROR input egress interface ae10.0
set forwarding-options analyzer MIRROR input ingress interface xe-0/2/3.0
set forwarding-options analyzer MIRROR input egress interface xe-0/2/3.0
set forwarding-options analyzer MIRROR input ingress interface xe-1/2/1.0
set forwarding-options analyzer MIRROR input egress interface xe-1/2/1.0
OR to monitor an entire VLAN
set forwarding-options analyzer MIRROR input ingress vlan XXX
2) set output port, i.e where your laptop will connect to
set forwarding-options analyzer MIRROR output interface ge-0/0/22.0
3) On ex4300 with some firmware versions you need to set below command or it will not mirror any packets
set forwarding-options analyzer MIRROR ratio 1
Check the session is up
show analyzer MIRROR
Chekc stats, mirror packet counter should be increasing and you see wireshark data on the laptop on port 22
show analyzer MIRROR statistics
-------------------------------------------