File tree Expand file tree Collapse file tree
app/Services/LogAnalysis/GoAccess
resources/views/ssh/services/log_analysis/goaccess/bin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class GoAccess extends AbstractService
2121
2222 public const CRON_FREQUENCY = '0 * * * * ' ;
2323
24- public const SCRIPT_VERSION = 1 ;
24+ public const SCRIPT_VERSION = 2 ;
2525
2626 public const CONF_VERSION = 1 ;
2727
Original file line number Diff line number Diff line change 6161 fi
6262 else
6363 # Normal path: direct-file incremental (GoAccess tracks inode/offset).
64+ # Feed only uncompressed logs — GoAccess reads rotated *.gz files as
65+ # binary and aborts the run. Compressed rotations were already ingested
66+ # by earlier runs, and the boundary window above re-reads them via
67+ # `zcat -f` when crossing months.
68+ local files=() f
6469 # shellcheck disable=SC2086
65- goaccess $LOG_GLOB --log-format=" $LOG_FORMAT " --persist --restore --db-path=" $db " -o " $out " --date-spec=date --no-progress
70+ for f in $LOG_GLOB ; do
71+ [ -e " $f " ] || continue
72+ case " $f " in * .gz) continue ;; esac
73+ files+=(" $f " )
74+ done
75+ [ " ${# files[@]} " -gt 0 ] || return 0
76+ goaccess " ${files[@]} " --log-format=" $LOG_FORMAT " --persist --restore --db-path=" $db " -o " $out " --date-spec=date --no-progress
6677 fi
6778}
6879
You can’t perform that action at this time.
0 commit comments