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.
kajlasunil
Staff
Staff
Article Id 267354
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.

 
gui_Uptime.PNG

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.

 

After Reboot.PNG

Related document:

Config system automation destination: FortiGate CLI reference.

Contributors