Check Ipsec Vpn Status by Command Cli

HI,
I would need to retrieve the following information from the XG 135 Firewall via script:
- VPN status node by node and child by child
- restart the VPN if phase2 or phase1 is down

Can you help me retrieve this information via commands?
Thank you



Edited TAGs
[edited by: Erick Jan at 8:59 AM (GMT -7) on 21 Sep 2023]