Technical Tip: FortiAnalyzer HA configuration and troubleshooting
Description
This article describes how each FortiAnalyzer node is assigned its own unique IP address (Primary and Secondary), while both share a common Virtual IP address. This shared VIP ensures seamless failover and continuous network availability through VRRP.
Scope
FortiAnalyzer.
Solution
Source address: The primary IP address of the interface the packet is being sent.
Destination IPÂ address: 224.0.0.18 (Multicast IP address).
Â
This is a link-local scope multicast address. Routers should not forward a datagram with this destination address, regardless of its TTL:
TTL: 255.
Protocol:Â The IP protocol number assigned by the IANA for VRRP is 112 (decimal).
MAC Address in the following format: 00-00-5E-00-01-{VRID}.
Â
Cluster settings:
Peer IP: 10.123.5.198 (Secondary FortiAnalyzer IP address).
Peer SN: FAZVMXXXXXX (Secondary FortiAnalyzer Serial Number).
Â
Interface settings:Â
port2 and port1 must be set with the interface IPs, as the cluster settings do not automatically set them.Â
Primary - port2 = 10.123.5.189.
Primary - port1 = 10.109.21.189.
Secondary - port2 = 10.123.5.198.
Secondary - port1 = 10.109.21.198.
Group name:Â HA (any name can be given, but it should be the same on the primary and secondary units).
Group ID:Â 9 (any number (1-255) can be given, but it should be the same on the primary and secondary units).
Password:Â Fortinet@123 (any password can be provided, but it should be the same on the primary and secondary units).
Heartbeat Interval:Â 4.
Priority:Â 120 (Higher Value states as Primary device).
Log Data Sync:Â Enable the toggle option.
Â

Â
On FortiAnalyzer-Secondary device: under System Settings -> HA -> Operation mode, select 'High Availability'.
Configure the following details:
Preferred Role: Secondary.
Â
Cluster Virtual IP:
Interface: port1.
IP Address: 10.109.21.123 (make sure this IP is not used in the network).
Â
Cluster Settings:
Peer IP: 10.123.5.189 (Primary FortiAnalyzer IP address).
Peer SN: FAZVMXXXXXX (Primary FortiAnalyzer Serial Number).
Group Name:Â HA (Any name can be given, but it should be the same on the primary and secondary units).
Group ID:Â 9 (Any number (1-255) can be given, should be the same on the primary and secondary units).
Password:Â Fortinet@123 (any password, but it should be the same on the primary and secondary units).
Heartbeat Interval:Â 4.
Priority:Â 100 (lower value states as Secondary device).
Log Data Sync:Â Enable the toggle option.
Â

Â
After configuring the primary and secondary units, this output on the GUI can be seen:

Â
Important note:
When performing the initial synchronization of the HA cluster, only the Secondary node (the member with preferred-role = secondary or lower priority) must use the 'Initial-sync' setting (enabled). This is also confirmed by the Configuring HA options section of the admin guide.
If both nodes initiate the sync simultaneously, each node may attempt to push its own database to the peer, causing the HA pairing to fail or remain in 'Secondary-Sync' state.
Once the HA cluster has been formed, it can be accessed via the GUI using the cluster IP address. Here is an example of how it may look once logged in: it will show the hostname in the top-left corner of the page and the HA status in the top-right corner:

Â
Troubleshooting commands:
On Primary-FortiAnalyzer:
diagnose ha status 
get system haÂ

Â
 On Secondary-FortiAnalyzer:
diagnose ha statusÂ

Â
get system haÂ

Â
With these 2 commands, troubleshoot the status and the configured values for FortiAnalyzer-HA.
Restart the Cluster Process and collect its debug output:
After checking the configuration settings, restart the clustering process on both the primary and secondary devices.
diagnose test application clusterd 1
diagnose test application clusterd 99Â
If the Active-Active HA (GEO redundant HA) is required, the following command must be used to enable the unicast HA:
config sys ha
  set unicast enable
end
If the initial logs sync has completed but the configuration has not synced, run the following command to sync the config:
diagnose ha force-cfg-resync
In later versions, the command may be:
diagnose ha force-resyncÂ
Collect the cluster debug output on both the primary and secondary devices.
diagnose debug application clusterd 255
diagnose debug enable 
  Â
Also, the following command will show the HA live connection status, like keep-alive messages:
diagnose ha dump-datalogÂ
Troubleshooting commands:
Run the top command before forming the HA to see all errors within the process, and note that 'execute shell' has been disabled in FortiAnalyzer v7.2.10/v7.4.5/v7.6.2.
diagnose debug app ha 255
diagnose debug enable
diagnose ha status
diagnose ha stats
diagnose test app cluster 1
diagnose test app cluster 3 conn
diagnose test app cluster 3 log
diagnose test app cluster 97 status
execute shellÂ
cat /etc/keepalived/keepalived.cfg
cat /drive0/private/clusterd/faz-ha.log
cat /drive0/private/clusterd/keepalived.log
diagnose sniff packet portX "vrrp" 3Â
Both nodes attempted initial sync:Â
If initial sync is enabled on both nodes concurrently, the cluster may never form. The fix is to stop sync on one node (or reboot), then only enable initial sync on the secondary node.
Â
Related documents:Â
Technical Tip: How to configure FortiAnalyzer HA instance in Google Cloud Platform (GCP)
Technical Tip: File system check on FortiAnalyzer in a High Availability (HA) setup
Troubleshooting Tip: FortiAnalyzer HA configurations that will not synchronize
Technical Tip: FortiManager HA cluster setup and troubleshooting
