Description
This article describes how to use automation stitches to automatically send alert emails if the status of the VPN tunnel changes.
Scope
FortiGate.
Solution
If multiple IPsec tunnels are configured, use the vpntunnel filter in the Field Filter(s) section to filter for a particular tunnel.
Specify the email address that the alerts will be sent to and select Apply:
config system automation-trigger
edit "IPsec connection status changed"
set event-type event-log
set logid 37138
config fields
edit 1
set name "vpntunnel"
set value "IpsecTunnel"
next
end
next
end
config system automation-action
edit "Default Email"
set action-type email
set email-to "test@example.com"
set email-subject "%%log.logdesc%%"
set message "%%log%%"
next
end
config system automation-stitch
edit "IPS Update Stitch"
set trigger "AV & IPS DB update"
config actions
edit 1
set action "CLI Script"
set required enable
next
edit 2
set action "Default Email"
set required enable
next
end
next
end


The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.