Technical Tip: Collecting EMS v7.4 logs manually when the EMS GUI is unreachable
| Description | This article describes in detail how to connect to an EMS server running EMS v7.4.0 and manually collect essential logs for troubleshooting, which is particularly useful when the EMS GUI is inaccessible. |
| Scope | FortiClient EMS v7.4.x. |
| Solution | Prerequisites:
Steps to connect and collect logs:
ssh username@EMS_IP
EMS logs:
sudo tar -czf /tmp/fortiems_logs.tar.gz /var/log/forticlientems/
Apache logs:
sudo tar -czf /tmp/apache_logs.tar.gz /var/log/apache2
PostgreSQL logs:
sudo tar -czf /tmp/postgresql_logs.tar.gz /var/log/postgresql/
Redis logs:
sudo tar -czf /tmp/redis_logs.tar.gz /var/log/redis/
sudo journalctl -u ufw --since -10d > /tmp/ufw_logs.txt
VM system logs:
sudo journalctl -x --since -10d > /tmp/system_logs.txt
EMS diagnostic tool log generator:
sudo /opt/forticlientems/bin/diagnostic_tool -o /tmp/diag
Once the logs are collected, download them from the /tmp/ directory to the local system for analysis.
To download the logs:
scp username@EMS_IP:/tmp/fortiems_logs.tar.gz ~/Desktop/ scp username@EMS_IP:/tmp/apache_logs.tar.gz ~/Desktop/ scp username@EMS_IP:/tmp/diag.zip ~/Desktop/
Each file will be saved to the desktop (or the directory specified) for further review or sharing with the support team.
./emscli execute diagnostic --copy.service scp --remote.ip --remote.user --remote.password --remote.folder
Related document: |

