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.
tpatel
Staff
Staff
Article Id 329643
Description This article describes that SNMP is failing for specific hosts and fails to match the community. 
Scope FortiOS.
Solution

Run the SNMP debug on FortiGate. 

 

diagnose debug reset 
diagnose debug application snmpd -1 
diagnose debug console timestamp enable 
diagnose debug enable 

 

In SNMP debug it shows it failed to match the community. 

 

snmpd: request 1(root)/28/10.238.100.41 != comm 1/0/172.17.248.21/255.255.255.255 

snmpd: host or intf mismatch 

snmpd: checking against community "FortiManager" 

snmpd: name mismatch. 

snmpd: failed to match community "FortiN******" 

 

Check community name is the same on both the FortiGate and SNMP servers.  

Check the configuration of the SNMP community and host configuration.

 

Picture3.png 

config system snmp community
    edit 2
        set name "FortiN******"

config hosts
    edit 3
        set source-ip 172.17.247.241
        set ip 10.238.100.41 255.255.255.255
        set host-type trap       
<--  FortiGate is not going to respond to the query if the trap only selected. 
    next
end

 

As the host type is set to trap only due to this, there is the error of community mismatch.  

To resolve this, set the host-type to any so FortiGate will also respond to the query.