Chapter 9 High Availability for FortiOS 5.0 : Operating a cluster : Clusters and SNMP : SNMP get command syntax for the primary unit
  
SNMP get command syntax for the primary unit
Normally, to get configuration and status information for a standalone FortiGate unit or for a primary unit, an SNMP manager would use an SNMP get commands to get the information in a MIB field. The SNMP get command syntax would be similar to the following:
snmpget -v2c -c <community_name> <address_ipv4> {<OID> | <MIB_field>}
where:
<community_name> is an SNMP community name added to the FortiGate configuration. You can add more than one community name to a FortiGate SNMP configuration. The most commonly used community name is public.
<address_ipv4> is the IP address of the FortiGate interface that the SNMP manager connects to.
{<OID> | <MIB_field>} is the object identifier (OID) for the MIB field or the MIB field name itself. The HA MIB fields and OIDs are listed in Table 57.
 
Table 57: SNMP field names and OIDs
MIB field
OID
Description
fgHaSystemMode
.1.3.6.1.4.1.12356.101.13.1.1.0
HA mode (standalone, a-a, or a-p)
fgHaGroupId
.1.3.6.1.4.1.12356.101.13.1.2.0
The HA priority of the cluster unit. Default 128.
fgHaPriority
.1.3.6.1.4.1.12356.101.13.1.3.0
The HA priority of the cluster unit. Default 128.
fgHaOverride
.1.3.6.1.4.1.12356.101.13.1.4.0
Whether HA override is disabled or enabled for the cluster unit.
fgHaAutoSync
.1.3.6.1.4.1.12356.101.13.1.5.0
Whether automatic HA synchronization is disabled or enabled.
fgHaSchedule
.1.3.6.1.4.1.12356.101.13.1.6.0
The HA load balancing schedule. Set to none unless operating in a-p mode.
fgHaGroupName
.1.3.6.1.4.1.12356.101.13.1.7.0
The HA group name.
fgHaStatsIndex
.1.3.6.1.4.1.12356.101.13.2.1.1.1.1
The cluster index of the cluster unit. 1 for the primary unit, 2 to x for the subordinate units.
fgHaStatsSerial
.1.3.6.1.4.1.12356.101.13.2.1.1.2.1
The serial number of the cluster unit.
fgHaStatsCpuUsage
.1.3.6.1.4.1.12356.101.13.2.1.1.3.1
The cluster unit’s current CPU usage.
fgHaStatsMemUsage
.1.3.6.1.4.1.12356.101.13.2.1.1.4.1
The cluster unit’s current Memory usage.
fgHaStatsNetUsage
.1.3.6.1.4.1.12356.101.13.2.1.1.5.1
The cluster unit’s current Network bandwidth usage.
fgHaStatsSesCount
.1.3.6.1.4.1.12356.101.13.2.1.1.6.1
The cluster unit’s current session count.
fgHaStatsPktCount
.1.3.6.1.4.1.12356.101.13.2.1.1.7.1
The cluster unit’s current packet count.
fgHaStatsByteCount
.1.3.6.1.4.1.12356.101.13.2.1.1.8.1
The cluster unit’s current byte count.
fgHaStatsIdsCount
.1.3.6.1.4.1.12356.101.13.2.1.1.9.1
The number of attacks reported by the IPS for the cluster unit.
fgHaStatsAvCount
.1.3.6.1.4.1.12356.101.13.2.1.1.10.1
The number of viruses reported by the antivirus system for the cluster unit.
fgHaStatsHostname
.1.3.6.1.4.1.12356.101.13.2.1.1.11.1
The hostname of the cluster unit.
To get the HA priority for the primary unit
The following SNMP get command gets the HA priority for the primary unit. The community name is public. The IP address of the cluster interface configured for SNMP management access is 10.10.10.1. The HA priority MIB field is fgHaPriority and the OID for this MIB field is 1.3.6.1.4.1.12356.101.13.1.3.0 The first command uses the MIB field name and the second uses the OID:
snmpget -v2c -c public 10.10.10.1 fgHaPriority
snmpget -v2c -c public 10.10.10.1 1.3.6.1.4.1.12356.101.13.1.3.0