Prepare aFortiMonitor Agent for server imaging/cloning
For Linux Servers
-
Stop cron from running.
RHEL:service crond stop
Ubuntu:systemctl stop cron
-
Confirm that cron is inactive.
RHEL:service crond status
Ubuntu:systemctl status cron
You should see output similar to the below snippet to indicate that cron is inactive.
# service crond status
Redirecting to /bin/systemctl status crond.service
● crond.service - Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Mon 2021-06-28 16:37:17 EDT; 5s ago
-
Then you need to remove some files the agent creates when it is installed and run.
-
Delete the fm-agent.db file.
rm /var/lib/fm-agent/fm-agent.db
-
Delete the fm_agent.cfg file.
rm /etc/fm-agent/fm_agent.cfg
-
-
Begin creating the server image.
If you restart your server before creating an image, you will need to perform these steps over again unless cron is disabled upon reboot.
For Windows Servers
-
Create the FortiMonitorAgent.manifest file in the root of the C: drive. For more information, see Use the Agent manifest file.
-
Run the following command from a PowerShell Window as an administrative user:
Start-Process -FilePath msiexec -Wait -ArgumentList "/q INSTALLATION=`"Install`" /i fortimonitor-agent-prod-NET4.5.latest.msi MANIFESTFILE=`"FortimonitorAgent.manifest`" IMAGEINSTALL=`"true`""
The MANIFESTFILE parameter is the path to the manifest file created above. If this parameter is not present, the installer will look for the manifest in C:\ by default.
-
Begin creating the server image.