Created on 10-11-2024 08:07 AM Edited on 11-21-2024 05:32 AM By Anthony_E
Description | This article describes how to prevent FortiSIEM filesystem full crashes. |
Scope | FortiSIEM. |
Solution |
It is possible for FortiSIEM to receive an abnormally huge load where a lot of system logs are written too quickly to be rotated. This can fill up the main / root disk and cause the appliance to become unresponsive.
To avoid these issues, the next steps will detail how to build a virtual disk within the FortiSIEM and set the logs in this disk to make the / root disk safer. From the super CLI as root:
df -h /
dd if=/dev/zero of=/logVirtDisk.img bs=1M count=2400 mkfs -t ext4 /logVirtDisk.img
cd /var/log tar -czvf /tmp/httpd_logs.tar.gz httpd systemctl stop httpd rm -rf httpd/* mount -t auto -o loop /logVirtDisk.img /var/log/httpd echo "/logVirtDisk.img /var/log/httpd ext4 defaults 0 0" >> /etc/fstab tar -xvf /tmp/httpd_logs.tar.gz
mkdir /var/log/httpd/mod_security chown apache:root /var/log/httpd/mod_security chmod 770 /var/log/httpd/mod_security cp -rp /var/lib/mod_security/* /var/log/httpd/mod_security rm -rf /var/lib/mod_security/* cp /etc/httpd/conf.d/mod_security.conf /tmp/mod_security.conf_bak sed -i 's#SecTmpDir .*#SecTmpDir /var/log/httpd/mod_security#' /etc/httpd/conf.d/mod_security.conf sed -i 's#SecDataDir .*#SecDataDir /var/log/httpd/mod_security#' /etc/httpd/conf.d/mod_security.conf
systemctl start httpd
Afterwards, FortiSIEM will be reachable again and Apache logs will be on a specific disk.
Note: This configuration may need to be renewed after a FortiSIEM upgrade. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.