FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
Vedaant
Staff
Staff
Article Id 338725
Description

This article describes how to configure an automation stitch for a specific IPsec to get an alert email for status changes.

Scope FortiGate.
Solution

Create an automation stitch for email alerts for IPsec tunnel status changes. Go to Security Fabric -> Automation -> Stitch and select 'Create New'.

 

create automation stitch.PNG


Create a trigger and action configured to send an alert email.

Automation stitch.PNG

 

Trigger configuration. Select event IPsec connection status changed, and for specific IPsec tunnels, enter the field filters  
vpntunnel: 'FGT1toFGT2 -----------name of the specific IPSEC tunnel'.

stitch field value.PNG

 

To get the field value, download the logs from the Events logs:


status change logs.PNG

 

From the download logs, fetch the exact field filter value entered in the trigger:


raw logs.PNG

Configure Action to receive email notifications for tunnel status changes:


email.PNG

 

Example configuration in the CLI: 

 

config system automation-trigger
    edit "FGTt1toFGT2 IPSEC status change"
        set event-type event-log
        set logid 37138
            config fields
                edit 1
                    set name "vpntunnel"
                    set value "FGT1toFGT2"
                next
            end
    next
end

 

config system automation-action
    edit "FGT1toFGT2 status changed"
        set action-type email
        set email-to "abc@xyz.com"
        set email-subject "FGT1_to_FGT2 status changed"
    next
end

 

config system automation-stitch
    edit "FGT1_to_FGT2 status change"
        set trigger "FGTt1toFGT2 IPSEC status change"
            config actions
                edit 1
                    set action "FGT1toFGT2 status changed"
                    set required enable
                next
            end
    next
end

 

When the tunnel status for a specific tunnel changes, email alerts will be received, but not for other IPsec tunnels.

trigger.PNG