Skip to main content
alif
Staff
Staff
Dec 6, 2017 2:30 AM UTC

How to enable FortiGate Cloud logging from the CLI

  • Nov 19, 2026 9:31 AM UTC
  • 0 replies
  • 30524 views
  • Translate All

Description


Steps to enable FortiCloud logging on the FortiGate.

 
Scope


FortiCloud and FortiGate.

Solution

Enabling FortiCloud settings from the CLI:

To enable FortiCloud logging, use any SSH/Telnet client (e.g., PuTTY)  to access the FortiGate through the CLI, or use the "Web Interface" by selecting the "CLI Console" from the top-right corner.

Once you have logged in, execute the following commands:

config log fortiguard setting
    set status enable
end


Note: In case of an error while enabling FortiGuard logging, log in to FortiCloud via "CLI Method" first, then re-issue the commands above.

2025-04-08 09 55 25.jpg

 

Activating the FortiCloud Account.


CLI Method:


execute fortiguard-log login <email> <password> <domain>


Note: The domain can be one of the following: US, Europe, or GLOBAL.

 

Example:

execute fortiguard-log login johndoe@fortinet.com password GLOBAL


Note: In the FortiOS CLI, the backslash (\) is used either to escape special characters or as a line continuation character. Therefore, when a password contains a backslash (\), the following step is required:

  • Enclose the entire password in matching single quotes (') or double quotes (").

  • Alternatively, escape each backslash by using a double backslash (\\).


For example:

  • Password: abc\123

  • Valid input:

    • 'abc\123'

    • "abc\123"

    • abc\\123 


Note: In 7.4 and 7.6 version branches, the command works without selecting a domain:

Example:  

 

execute fortiguard-log login <account_id> <password>

 

GUI method: Locate the FortiGate cloud section under System -> Dashboard and select Activate to create a FortiGate Cloud account or log into the existing account.

fortigate cloud 3.PNG

 

fortigate cloud 4.PNG


Once the account is active, the account information will appear in the "Dashboard".

 

kb_11409_2.png

 

Next, configure the FortiGate to send logs to FortiCloud.
Go to Log & Report -> Log Settings -> Cloud Logging Settings.

kb_11409_3.png

 

Select the Upload option to Realtime if more accurate logging is needed. Note that enabling this option may increase the CPU usage on the FortiGate, as it sends logs to FortiCloud in real time. 

To display logs from FortiCloud on the FortiGate, navigate to: Dashboard -> Log & Report -> Events -> System Events -> FortiCloud. This displays logs directly from FortiCloud, especially when logs are not being saved to Disk or Memory.

 

kb_11409_4.png

 

Enable "Logging" under Firewall Policy.
Go to Policy & Objects -> IPv4, enable Log allowed traffic, and select the logging option (Security Events/All Sessions).

 

kb_11409_5.png

 

Note: 

If all of the settings above are checked and the logs are still not received on the Cloud, make sure that FortiGate is running the latest firmware if using a Free Subscription with FortiGate Cloud.

Starting from February 28, 2025, a FortiGate without an active FortiGate Cloud subscription is required to upgrade to the latest firmware patch within 7 days of a new GA patch release, or FortiGate Cloud services will be paused for that device.

This will affect the cloud retention service, where logs will not be forwarded to FortiCloud until the device is updated to the latest firmware patch if using a Free FortiGate Cloud account. See the article Security enforcement change for FortiGates provisioned to FortiGate Cloud without active subscriptions.

The log usage under "Fabric Connectors" is shown as daily logs, as in the screenshot below:

Screenshot 2026-02-09 083115.png

 

However, the log usage under "dashboard" shows the total amount of usage since the FortiGate Cloud has been used (see the screenshot below); these two parts are not equivalent, as expected. 

Screenshot 2026-02-09 083109.png

 

Related documents:

    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024