Skip to main content
rito
Staff
Staff
June 4, 2026

Technical Tip: On FortiGate HA, conditions under which the secondary HA uptime does not reset to 0

  • June 4, 2026
  • 0 replies
  • 226 views

Description

This article describes the conditions under which the Secondary FortiGate's HA uptime does not reset to 0 after a failover in an HA cluster.

Scope

FortiGate.

Solution

In a FortiGate HA cluster, the ha uptime field represents the age difference (in seconds) between the Primary and Secondary units.

It can be checked with the following commands:

diagnose sys ha dump-by vcluster
diagnose sys ha dump-by group


Under normal operation, after a failover, the new Secondary's uptime is reset to 0, and the difference value is displayed on the Primary side.


However, under the following conditions, the Secondary's uptime has been observed not to reset to 0.

Condition 1: Recovery from reboot with uptime difference below ha-uptime-diff-margin.

Condition 2: When override is enabled.


Condition 1: Recovery from reboot with uptime difference below ha-uptime-diff-margin:

When all cluster members reboot and recover with an uptime difference below ha-uptime-diff-margin (default: 300 seconds), Primary selection by uptime is not performed.


In this case, Primary selection is determined by priority instead, so the uptime reset does not occur, and both members retain non-zero values.

ha-uptime-diff-margin can be checked or modified with the following commands:

config system ha
    set ha-uptime-diff-margin <seconds> // default 300
end


The following is an example output of diagnose sys ha dump-by vcluster that matches this condition.

Both units show non-zero uptime values, and the difference is below 300 seconds (203 seconds in this example).


vcluster-1: state/o/chg_time=2(work)/2(work)/1779436287(2026-05-22 16:51:27)
        '<FGT SN#1>': ha_prio/o=0/0, link_failure=0, pingsvr_failure=0, flag=0x00000001, mem_failover=0, uptime/reset_cnt=3/1
        '<FGT SN#2>': ha_prio/o=1/1, link_failure=0, pingsvr_failure=0, flag=0x00000000, mem_failover=0, uptime/reset_cnt=206/1


Condition 2: When override is enabled:

When a failover occurs while override is enabled, the primary selection process is changing, and after the monitoring interfaces, the priority will be checked. The election process will stop, and the primary will be elected based on the higher priority, unless if the priority is the same for both devices. Then the uptime will be checked. 


This behavior applies even when the uptime difference is equal to or greater than ha-uptime-diff-margin.


override can be checked or modified with the following commands:

config system ha
    set override enable // default disable
end


The following is an example output of diagnose sys ha dump-by vcluster that matches this condition.
Although the uptime difference exceeds 300 seconds (1658 seconds), the Secondary's uptime does not reset to 0 after failover, and the value remains on the new Primary side.

Before failover:

vcluster-1: state/o/chg_time=2(work)/2(work)/1780564869(2026-06-04 18:21:09)
        '<FGT SN#1>': ha_prio/o=0/0, link_failure=0, pingsvr_failure=0, flag=0x00000001, mem_failover=0, uptime/reset_cnt=3/2
        '<FGT SN#2>': ha_prio/o=1/1, link_failure=0, pingsvr_failure=0, flag=0x00000000, mem_failover=0, uptime/reset_cnt=1658/1


After failover:

vcluster-1: state/o/chg_time=3(standby)/2(work)/1780564893(2026-06-04 18:21:33)
        '<FGT SN#1>': ha_prio/o=1/1, link_failure=0, pingsvr_failure=0, flag=0x00000000, mem_failover=0, uptime/reset_cnt=3/2
        '<FGT SN#2>': ha_prio/o=0/0, link_failure=0, pingsvr_failure=0, flag=0x00000001, mem_failover=0, uptime/reset_cnt=1658/1


Related documents:

    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!