Created on
11-04-2019
06:05 AM
Edited on
01-09-2025
12:08 AM
By
Jean-Philippe_P
Description
This article describes how to create a FortiOS event log trigger for when a specific event log ID occurs, especially how to select multiple event log IDs and apply log field filters.
Scope
FortiGate.
Solution
FortiGate 6.0, 6.2 and 6.4 :
GUI:
Above is an example for 'Interface status change'. This event will be triggered if there is any change to interface status.
date=2019-10-31 time=17:24:19 logid="0100046600" type="event" subtype="system" level="notice" vd="root" eventtime=1572539059696936762 tz="+0100" logdesc="Automation stitch triggered" stitch="Test" trigger="Test" action="Test_email" from="log" msg="stitch:Test is triggered."
The debug log sample above states that the stitch was triggered successfully.
Note: Make sure to configure an Email server in FortiGate (under System -> Advanced -> Email Service).
FortiGate 7.0 and above:
There are multiple critical events and logs for which automated alerts can be created. It is possible to configure FortiGate to send an alert email when a specific event log ID occurs with an automation stitch.
The event options refer to the message meanings listed in the FortiOS Log Message Reference. The event ID and log name are displayed in the tooltip upon hovering the cursor over an entry.
In the Field filter(s) field, select the + to add multiple field filters. All the configured filters must match for the stitch to be triggered. Verify the logs and then select the fields from the log details. In this example, ‘srcip’ is used as a filter. If an IP address x.x.x.x attempts to log in to FortiGate and fails, it will trigger the stitch.
Select OK.
Select the trigger in the list and select Apply.
Select Add Action. Select the pencil icon to edit the Default Email entry.
Configure the fields as needed:
From now on, when a user with IP address x.x.x.x attempts to log in to FortiGate, the automation stitch will trigger and an email alert will be sent to the intended recipient.
An automation stitch can be configured using a specific event log ID from the Logs on FortiGate. Search the event using log ID as follows:
date=2023-04-29 time=13:42:08 eventtime=1682790128981194164 tz="-0400" logid="0100022922" type="event" subtype="system" level="notice" vd="root" logdesc="Link monitor status" name="Wan2Failover" interface="port1" probeproto="ping" msg="Link Monitor changed state from die to alive, protocol: ping." utmref=0:1682790128
Related documents:
Technical Tip: How to customize log received through automation stitch.
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.