Technical Tip: How to identify the device from FortiManager integrity check error
Description
This article describes how to identify the FortiGate device associated with an integrity check error.
Scope
FortiManager.
Solution
While running a device database integrity check, 'diagnose pm2 check-integrity device', errors may be reported for one or more managed devices. These errors reference an internal device database file that includes the device ID.
For example:
diagnose pm2 check-integrity device
--- pragma integrity_check device db ---
pragma integrity_check fails: /var/pm2/devdb447 -- Page 5596: never used
In this output, the number appended to /var/pm2/devdb represents the device ID.
Steps to identify the device:
- Take a note of the number following "/var/pm2/devdb". In the above given example, it is '447'.
- List managed devices by running the command 'diagnose dvm device list' in the FortiManager console. The output will look like this:
FMG-VM64 # diagnose dvm device list
--- There are currently 63 devices/vdoms managed ---
--- There are currently 63 devices/vdoms count for license ---
TYPE OID SN HA IP NAME ADOM IPS FIRMWARE HW_GenX
fmgfaz-managed 447 FGT30GTK******52 - 10.25.33.254 FGT-LAB root 7.0 MR4 (5164) N/A
|- STATUS: dev-db: modified; conf: out of sync; cond: Modified; dm: aborted; conn: up; source: FMG
|- vdom:[3]root flags:0 adom:root pkg:[modified]Spoke tmplgrp:[installed]Default Template
-
Identify the device with the OID matching the number found in step 1.
In this example, the device name is FGT-LAB in the ADOM root.
Notes:
- The following command can also be used to extract device information:
FMG-VM64 # diagnose dvm device list <Device OID>
- To fix such an issue, it is possible to retrieve the config for such a device. Refer to the article on how to retrieve config:
Technical Tip: Configuration import from the device to the ADOM DB/Policy & Objects - In case the Device Database is corrupted so severely that Retrieve does not help, the only way to fix such corruption will be to remove the device from FortiManager and then add it back.
