Created on
05-09-2025
05:08 AM
Edited on
06-25-2025
11:23 PM
By
Jean-Philippe_P
Description | This article describes how to trigger an automation stitch with CLI commands when an BGP event is triggered. |
Scope | All supported versions of FortiOS. |
Solution |
Note: The log ID of this event should match that of the triggered event; then, only automation stitch will trigger the configured action.
Note: If the following event log is seen in the general system event logs, make sure the cli script has super_admin access as explained below.
User delete the result of script autod.10 from autod
Similarly, any number of stitches can be triggered with different event IDs. The result of the script can be verified with the following logs:
After the above event was triggered, the interface port4 was marked as down by the CLI script:
Interface port4 was marked as down:
date=2025-06-25 time=16:26:52 eventtime=1750894012430389982 tz="-0700" logid="0103020300" type="event" subtype="router" level="warning" vd="root" logdesc="BGP neighbor status changed" msg="BGP: %BGP-5-ADJCHANGE: VRF 0 neighbor 172.16.30.2 Down BGP Notification FSM-ERR"
If a specific BGP neighbor down event is necessary (in this case, when BGP peer 172.16.30.2 is down) to trigger the automation-stitch, a filter can be applied under 'edit Automation Trigger': As it is shown in the above image, the limit for the field filter value is 63 characters, and because of this restriction, an option is to set the message in the following way:
"msg="BGP: %BGP-5-ADJCHANGE: VRF 0 neighbor 172.16.30.2 Down BGP*"
FGT-HUBDC1 (BGP_peer_DOWN) # show
Related documents: Technical Tip: Use FortiGate automation stitches for alert emails |
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.