FortiManager
FortiManager supports network operations use cases for centralized management, best practices compliance, and workflow automation to provide better protection against breaches.
nradia_FTNT
Staff
Staff
Article Id 294919
Description This article describes that when running a 'Remote FortiGate Directly (via CLI)' script on a FortiGate, it causes an 'Unknown' policy package status.
Scope FortiManager v6.4, 7.x and FortiGate v6.4, 7.x.
Solution

The reason is every time a direct CLI script is running, the FortiGate configuration is retrieved by script_manager (system process) in FortiManager:

 

FMGR KB -1.png

 

It could be verified under FortiManager -> <FortiGate> -> Dashboard -> Summary -> Configuration and Installation -> Revision. 

 

FMGR KB -2.png

 

Any configuration retrieval triggers a Policy Package change to 'Unknown' by FortiManager logic. 

 

FortiManager does not retrieve configuration while or after running the script on the Device or Policy&object database because there is no interaction with FortiGate. It is an internal FortiManager process.

To reflect these changes on the FortiGate after running the script on the Device or Policy&object database, the configuration should be installed on the device. 
 
No matter what changes have been pushed on the device: the 'Unknown' Policy Package status is related to the configuration 'Retrieve'. If the configuration is just simply retrieved manually, it will still trigger an 'Unknown' status no matter what changes have been done on the FortiGate (Device, Policy, both, or no change).