Skip to main content
jhussain_FTNT
Staff
Staff
March 10, 2022

Technical Tip: How to clear the unit inventory list from FortiGate in particular interval

  • March 10, 2022
  • 0 replies
  • 15247 views
Description This article describes how to clear the unit inventory in particular frequent intervals via the automated script.
Scope FortiGate.
Solution

Units that are automatically discovered by FortiGate will expire in 28 days by default if FortiGate does not see the unit in the network anymore.

 

The following automated script is to clear the unit inventory in every 8 hours.

 

config system auto-script
    edit "cleardeviceuser"
        set interval 28800
        set repeat 0
        set script "
            diagnose user device clear"
    next
end

 

If in case of VDOM and need to clear in particular VDOM.

 

config system auto-script
    edit "cleardeviceuser"
        set interval 28800
        set repeat 0
        set script "
config vdom
    edit <vdom name>
        diagnose user device clear"
    next
end

 

Alternative solution is to follow steps stated on this kb article on Technical Tip: How to control Discovered Device Timeout for Device Monitoring.