mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
feat: use mountpoint for Elastic log limit
Instead of just existence, this checks if the directories are separate mountpoints when determining disk size and log_size_limit calculations. It also sets the percentage to 80 if /nsm/elasticsearch is a separate mountpoint. This allows for better disk utilization on server configurations where /nsm is based on large slow HDDs for increased PCAP retention but /nsm/elasticsearch is based on SSDs for faster Elasticsearch performance.
This commit is contained in:
@@ -2148,11 +2148,12 @@ set_default_log_size() {
|
||||
esac
|
||||
|
||||
local disk_dir="/"
|
||||
if [ -d /nsm ]; then
|
||||
if mountpoint -q /nsm; then
|
||||
disk_dir="/nsm"
|
||||
fi
|
||||
if [ -d /nsm/elasticsearch ]; then
|
||||
if mountpoint -q /nsm/elasticsearch; then
|
||||
disk_dir="/nsm/elasticsearch"
|
||||
percentage=80
|
||||
fi
|
||||
|
||||
local disk_size_1k
|
||||
|
||||
Reference in New Issue
Block a user