Description
This article describes the configuration of the FortiGate SNMP agent in order for the SNMP manager to get status information from the FortiGate unit and for the FortiGate unit to send traps to the SNMP manager.
Scope
FortiGate.
Solution
To configure SNMP access - GUI:
Note: The trusted hosts’ configuration applies to most forms of administrative access including HTTPS, SSH, and SNMP.
When a trusted host is identified for an administrator account, FortiOS accepts that administrator’s login only from one of the trusted hosts. A login, even with proper credentials, from a non-trusted host is dropped.
Guide for Trusted hosts
To configure the SNMP agent – GUI:
If no SNMP option is under the system, check the VDOM options, maybe global is not selected. This happens when the VDOM option is enabled. In that case, the SNMP option is visible under global VDOM.
If the SNMP Agent is not enabled and configured then there might be an issue with SNMP traffic where FortiGate does not reply back to SNMP queries.
To add an SNMP v1/v2c community - GUI:
To add an SNMP v3 community - GUI:
Two types of MIB files are available for FortiGate units: The Fortinet MIB and the FortiGate Core MIB.
Go to System -> SNMP and select 'Download FortiGate SNMP MIB File' and 'Download Fortinet Core MIB File'.
Configure the SNMP manager to receive traps from the FortiGate unit.
If units are in HA.
Each unit in the cluster sends its own traps and the manager can query both units.
A dedicated HA management port has to be enabled in the HA settings.
Note.
The ha-management interface must be cleared from all configuration and references (e.g. routes, DHCP server, policies…) – 'Ref' needs to be 0. Otherwise 'mgmt1' will not be presented as an interface to choose.
V5.2 and v5.4:
config system ha
set ha-mgmt-status enable
set ha-mgmt-interface "mgmt1"
set ha-mgmt-interface-gateway x.x.x.x
end
config system ha
set ha-mgmt-status enable
config ha-mgmt-interfaces
edit 1
set interface "interfaceX"
set gateway x.x.x.x
next
end
end
Since v5.6:
The 'ha-direct' setting has to be enabled on the SNMP settings.
For SNMPv2:
config system snmp community
edit 1
config hosts
edit 1
set ha-direct enable
next
next
end
For SNMPv3:
config system snmp user
edit 1
set ha-direct enable
next
next
end
For troubleshooting, collect the below debug command output:
Putty1:
diagnose debug application snmpd -1
diagnose debug console timestamp enable
diagnose debug enable
To disable debug :
diagnose debug disable
diagnose debug reset
Putty2:
diagnose sniffer packet any "port 161 or port 162" 6 0 a
Note:
Always make sure the SNMP agent is enabled in the below CLI section:
config system snmp sysinfo
set status enable
end
Related article:
Technical Tip: How to perform queries usning SNMPv3 to non-management VDOMs
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 2025 Fortinet, Inc. All Rights Reserved.