Skip to main content
farhanahmed
Staff
Staff
January 16, 2025

Technical Tip: How to view installation log in FortiManager

  • January 16, 2025
  • 0 replies
  • 1948 views
Description This article describes how to check installation log in FortiManager after config or a policy install.
Scope FortiManager.
Solution

The installing log in FortiManager can be viewed using below methods:

  1. During install.
  2. From Revision History.
  3. From Task Monitor.
  4. Using API.

 

  • During Install: Go to Device Manager -> Device & Groups -> Managed FortiGate -> Select a Device -> Install -> Install Wizard -> Select any install method -> Select Next and proceed with the install. Once install is completed 100%, select View Installation Log:

 

during_install.gif

 

 

  • From Revision History: Go to Device Manager -> Device & Groups -> Managed FortiGate -> Select a Device -> Dashboard -> Summary -> Under Configuration and Installation widget -> Select the number besides Total Revision -> Select an entry (Install log is available for entries Installed or Fail) -> Select View Install Log:

 

revision_history.gif

 

 

 

  • From Task Monitor: Go to System Settings -> Task Monitor -> Select a task (installation tasks have the description 'Install package to the device from commit') -> Select View Details -> Select any entry (in case of installation to multiple devices, there will be multiple entries each corresponding to a single device) -> Select View Installation Log:

 

task_monitor.gif

 

 

 

  • Using API: In this case, the regular POST request using 'https://{{host-IP}}/jsonrpc' does not work. Login to FortiManager using POST request 'https://{{host-IP}}/cgi-bin/module/flatui_auth' with below query:

 

{

    "url": "/gui/userauth",

    "method": "login",

    "params": {

        "username": "{{ADMIN_USER}}",

        "secretkey": "{{PASSWORD}}",

        "logintype": 0

    }

}

 

This will set the cookies for the session, particularly the 'HTTP_CSRF_TOKEN'. This token is then used for subsequent queries to maintain the session.

 

FMG_login_cookies.gif

 

 

To get the Install log, use the POST request with 'https://{{host-IP}}/cgi-bin/module/flatui_proxy' and the below query:

 

{

    "url": "/gui/deployment/adom/devices/{{DEVICE_OID}}/tasks/{{TASK_ID}}/log/preview",

    "method": "get"

}

 

  • TASK ID: ID of the task as seen in Task Monitor.
  • DEVICE_OID: Object ID of the Device  (FortiGate)

 

task_install_log.gif

 

The TASK ID can be obtained using a POST request with 'https://{{host-IP}}//cgi-bin/module/forward' (or using the default https://{{host}}/jsonrpc) and below query:

 

{

    "method": "get",

    "params": [

        {

            "url": "task/task",

            "loadsub": 0,

            "sortings": [

                {

                    "id": -1

                }

            ]

        }

    ]

}

 

get_task_id.gif

 

 

To obtain the DEVICE_OID (OID),  use the TASK ID and get the details of the task which includes the OID as well. Use POST request with 'https://{{host-IP}}//cgi-bin/module/forward' (or using the default https://{{host-IP}}/jsonrpc) and below query:

 

{

    "method": "get",

    "params": [

        {

            "url": "/task/task/{{TASK_ID}}}"

        }

    ]

}

 

get_oid.gif

 


Here for the TASK ID 4905, the OID is 2078 which refers to the device 'FGT-60F'. 

 

Related Documents:

Task Monitor.

Install Wizard.

Configuration revision history.

Technical Tip: Using FortiManager API.

Fortinet Development Network (FNDN) - FortiManager.