Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Services/LogAnalysis/GoAccess/GoAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class GoAccess extends AbstractService

public const CRON_FREQUENCY = '0 * * * *';

public const SCRIPT_VERSION = 1;
public const SCRIPT_VERSION = 2;

public const CONF_VERSION = 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,19 @@
fi
else
# Normal path: direct-file incremental (GoAccess tracks inode/offset).
# Feed only uncompressed logs — GoAccess reads rotated *.gz files as
# binary and aborts the run. Compressed rotations were already ingested
# by earlier runs, and the boundary window above re-reads them via
# `zcat -f` when crossing months.
local files=() f
# shellcheck disable=SC2086
goaccess $LOG_GLOB --log-format="$LOG_FORMAT" --persist --restore --db-path="$db" -o "$out" --date-spec=date --no-progress
for f in $LOG_GLOB; do
[ -e "$f" ] || continue
case "$f" in *.gz) continue ;; esac
files+=("$f")
done
[ "${#files[@]}" -gt 0 ] || return 0
goaccess "${files[@]}" --log-format="$LOG_FORMAT" --persist --restore --db-path="$db" -o "$out" --date-spec=date --no-progress
fi
}

Expand Down
Loading