FortiAnalyzer
FortiAnalyzer can receive logs and Windows host events directly from endpoints connected to EMS, and you can use FortiAnalyzer to analyze the logs and run reports.
ggiovanni
Staff
Staff
Article Id 384388

 

Description This article describes how to upload coredump files to SFTP Server that might be required for further troubleshooting by TAC Support.
Scope FortiAnalyzer and FortiManager.
Solution

In this scenario, a single user (sftpuser) who belongs to group (sftp) has been created, and the sshd_config on the SFTP Server (Ubuntu-based) has already been modified so the Home Directory for sftpuser is /home. Sample config:

 
Ubuntu-config-sftp.png

 

During the investigation on the TAC ticket, it is sometimes required to gather coredump files from specific daemons that are having issues on the FortiAnalyzer/FortiManager.


To enable the coredump files for a specific daemon or PID, please use this command:

 

diagnose debug coredump enable <daemon-name>

                                      11.png

 

Or 


diagnose debug coredump enable-pid <Process-ID>

                 12.png


After enabling the coredump feature on this device, the files will be generated automatically if the process or daemon terminates abnormally. There might be a waiting period before the files are generated. Monitoring can be done if any coredump files are being generated after a couple of hours by using the following command:

 

diag debug coredump list 

 

coredump-list.png

 

Once coredump files are ready, transferring the coredump files to the SFTP server is required as the next step:

 

diagnose debug coredump upload <daemon-name> sftp <SFTP-Server-IP> <username> <password> <directory>

 

Example:

 

diagnose debug coredump upload oftpd sftp 10.47.4.156 sftpuser fortinet /sftpuser/sftpfiles

 

coredump-upload.png

 

Note

Coredump files will be uploaded to /home/sftpuser/sftpfiles.

 

SFTP clients like WinSCP/Filezilla/others can be used to download the coredump files from the SFTP Server:

 

SFTP-download.png