Technical Tip: Monitor DHCP via SNMP
Description
This article describes how to monitor DHCP via SNMP.
Scope
FortiGate.
Solution
SNMP will monitor DHCP and send out traps when:
- DHCP server IP pool usage hits 90%.
- The DHCP server detects an IP address which already used by an end unit.
- DHCP client receives DHCP NAK,
SNMP queries refer to DHCP lease usage information (OID = 1.3.6.1.4.1.12356.101.23.2.1.1.2).
See the FortiGate DHCP MIBs - FortiGate 7.6.0 documentation.
The query result is based on the leased out percentage.
To enable the SNMP DHCP event in the GUI:
- Go to System -> SNMP.
- Select 'Create New' in either the SNMP v1/v2c table or SNMP v3 table, or edit an existing community or user.
- Configure the settings as required.
In the SNMP Events list, enable 'snmp-event::dhcp'.

config system snmp community
edit 1
set name "test-sys"
config hosts
edit 1
set ip 10.10.10.1 255.255.255.255
next
end
set events dhcp
next
end
config system snmp user
edit "test"
set notify-hosts 10.47.1.237
set events dhcp
set security-level auth-priv
set auth-proto sha224
set auth-pwd xxxxxx
set priv-pwd xxxxxx
next
end