Description |
This article describes how to automate the HA cluster reboot. |
Scope |
All FortiGate Firmware |
Solution |
The High Availability (HA) cluster may require a scheduled reboots in various scenarios.
This can be done with an automation script with the action set as a CLI script using the command 'execute reboot'. This will reboot the primary device, and all the traffic will failover to the secondary.
In this test scenario, both the primary and secondary devices have different uptimes.
To reboot the cluster at the same time, set the automation-destination on automation-stitch.
Step 1
Create an automation-destination.
config system automation-destination edit "rebootPrimary" set destination "FGT60FTK20006777" <-- Primary Device SN. next edit "rebootSeconday" set destination "FGT60FTK20008823" <-- Secondary Device SN. next end
Step 2
Create an automation action and configure a script to reboot the devices.
config system automation-action edit "RebootFGTCLI" set action-type cli-script set script "execute reboot" set accprofile "super_admin" next end
Step 3
Create a scheduled trigger to reboot the cluster every Sunday.
config system automation-trigger edit "RebootFGTeverySunday" set trigger-type scheduled set trigger-frequency weekly set trigger-weekday sunday set trigger-hour 11 next end
Step 4
Create two automation stitches for each primary and secondary device.
config system automation-stitch edit "RebootPrimary" set trigger "RebootFGTeverySunday" config actions edit 1 set action "RebootFGTCLI" set required enable next end set destination "rebootPrimary" next edit "RebootSecondary" set trigger "RebootFGTeverySunday" config actions edit 1 set action "RebootFGTCLI" set required enable next end set destination "rebootSeconday" next end
When the script executes, both of the devices will reboot at the same time.
Related document: Config system automation destination: FortiGate CLI reference. |
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 2024 Fortinet, Inc. All Rights Reserved.