Skip to main content
volkanavsar
Staff
Staff
July 27, 2023

Technical Tip: How to generate and export Debug logs from various platforms running with FortiClient and FortiClient EMS

  • July 27, 2023
  • 0 replies
  • 25454 views

Description

This article describes the process of generating and exporting debug logs from various platforms running with FortiClient and FortiClient EMS.

Scope

FortiClient EMS, FortiClient EMS Cloud, FortiClient Windows, FortiClient Linux, FortiClient macOS, FortiClient Android, and FortiClient IOS.

Solution

FortiClient EMS On-premises:

  1. Access the EMS console as a user with admin privileges.

  2. Under EMS -> System Settings -> Log Settings -> Log Level, change 'info' to 'debug'.

  3. Reproduce the issue being experienced.

  4. Navigate to EMS -> Administration -> Generate Diagnostic Logs -> Create.

  5. This operation may take a long time. Be patient.

  6. Once the log creation is complete, the 'Download' button will appear. Download the log.

 

1.jpg

 

2.jpg

 

FortiClient EMS Cloud:

Note: Feature not available since version 7.4.5.

  1. Access the EMS Cloud console via the Support portal.

  2. Under EMS -> System Settings -> Log Settings -> Log Level, change 'info' to 'debug'.

  3. Reproduce the issue being experienced.

  4. Navigate to EMS -> Administration -> Generate Diagnostic Logs -> Create.

  5. This operation may take a long time. Be patient.

  6. Once the log creation is complete, the 'Download' button will appear. Download the log.

 

3.jpg

 

4.jpg

 

FortiClient Windows:

  1. Access the EMS console as a user with admin privileges.

  2. Navigate to EMS -> Endpoint Profile -> Select profile -> Edit -> System Settings -> use Advanced instead of Basic settings -> Log Level, then change 'INFO' to 'DEBUG' and select all features.

  3. Confirm the setting by ensuring 'DEBUG' is selected under FortiClient -> The 'Settings' section -> Log Level.

  4. Reproduce the issue being experienced and take note of the exact timestamp of the events.

  5. Under FortiClient -> section About -> Diagnostic Tool, check that the details are correct and run the Diagnostic Tool. The output file should have a *.cab or *.zip extension, depending on the version, and will usually be present in %temp%\Diagnostic_Result or %LOCALAPPDATA%\FortiClient mp\Diagnostic_Result\.

 

5.jpg

 

1.png

 

2.png

 

3.png


04.png

 

5.png

 

Note: It is recommended to revert the configuration after collecting the debug logs.

 

To do so, navigate to EMS -> Endpoint Profile -> select -> Edit -> System Settings -> Use Advanced instead of Basic settings -> Log Level -> Change 'debug' to 'info' -> Deselect features that are not needed (or all of them).

           

FortiClient macOS:

  1. Access the EMS console as a user with admin privileges.

  2. Navigate to EMS -> Endpoint Profile -> select a profile -> Edit -> System Settings -> use Advanced instead of Basic settings -> Log Level -> Change 'info' to 'debug' -> select all features.

  3. Confirm the setting by ensuring 'Debug' is selected under FortiClient -> the 'Settings' section -> Log Level.

  4. Reproduce the issue being experienced and take note of the exact timestamp of the events.

  5. Find the output file under FortiClient -> the 'Settings' section -> Log File -> Export logs. The output file should have a *.cab or *.zip extension, depending on the version.

 

It is recommended to revert the configuration after collecting the debug logs. To do so, navigate to EMS -> Endpoint Profile -> Select -> Edit -> System Settings -> Use Advanced instead of Basic settings -> Log Level -> Change 'debug' to 'info' -> De-select features that are not needed (or all of them).

 

10.jpg

 

FortiClient Linux.

  1. Access the EMS console as a user with admin privileges.

  2. Navigate to EMS -> Endpoint Profile -> Select profile -> Edit -> System Settings -> Use Advanced instead of Basic settings -> Log Level -> Then change 'info' to 'debug' -> Select all features.

  3. Reproduce the issue being experienced.

  4. Make sure 'Debug' is selected under FortiClient -> Section Settings -> Log Level.

  5. Find the output file under FortiClient -> The 'Settings' section -> Log File -> Export logs. The output file should have a *.cab or *.zip extension, depending on the version.

 

It is recommended to revert the configuration after collecting the debug logs. To do so, navigate to EMS -> Endpoint Profile -> select -> Edit -> System Settings -> Use Advanced instead of Basic settings -> Log Level -> Change 'debug' to 'info' -> Deselect features that are not needed (or all of them).

 

12.jpg

 

13.jpg

 

For a Headless Linux endpoint (endpoint without a GUI), open a command prompt, run the command to zip the FortiClient Linux log directory:

sudo zip -r /tmp/linux-fct-logs.zip /var/log/forticlient


The output file linux-fct-logs.zip will be in the tmp directory:

ls -lh /tmp/linux-fct-logs.zip


FortiClient Android (It is possible to email FortiClient (Android) logs to Fortinet. To do this):

  1. Tap About.

  2. Tap Send Feedback Email:

 

15.jpg

 

16.jpg

 

  1. FortiClient IOS (It is possible to email FortiClient (iOS) logs to Fortinet. To do this):

  1. Tap About.

  2. Tap Diagnostic.

  3. Swipe right to enable Logging.

  4. Tap Report an Issue.
                                                       

17.jpg

 

18.jpg

 

19.jpg

 

FortiClient EMS On-premises (Windows-based).

To manually collect logs from FortiClient EMS Windows-based, when the EMS Console is inaccessible, run the following tool, 'EMSDiagnosticTool.exe', located at C:\Program Files(x86)\Fortinet\FortiClientEMS\. 

 

Screenshot 2025-06-25 170027.png

 

The output of the result is located in C:\Users\Administrator\AppData\Local\Temp.

 

FortiClient EMS On-premises (version 7.4.x, Linux-based).

To manually collect logs from FortiClient EMS version 7.4.x (Linux-based) when the EMS Console is inaccessible, run the following command in the terminal with elevated privileges using sudo:

 

sudo /opt/forticlientems/bin/diagnostic_tool -o /tmp/diag


EmsLinuxDiagTool.png

 

The output file will have a .zip extension (/tmp/diag.zip in the following command). Once the logs are collected, download them from the /tmp/ directory:

/tmp/fortiems_logs.tar.gz
/tmp/postgresql_logs.tar.gz
/tmp/redis_logs.tar.gz 
/tmp/ufw_logs.txt 
/tmp/system_logs.txt
/tmp/diag.zip

 

Or using the FortiClient EMS CLI tool: 

 

./emscli execute diagnostic --copy.service scp --remote.ip --remote.user --remote.password --remote.folder

 

Related articles: