From d1995f75684613408c5425ffce5af7a8c7953be0 Mon Sep 17 00:00:00 2001 From: Mulder Date: Fri, 21 Jun 2024 08:12:56 -0700 Subject: [PATCH] DBC22-2350: Filter out invalid access log lines --- compose/openshiftjobs/scripts/analyzeexportlogs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/openshiftjobs/scripts/analyzeexportlogs.sh b/compose/openshiftjobs/scripts/analyzeexportlogs.sh index 48ac1751..d4f4f1bd 100644 --- a/compose/openshiftjobs/scripts/analyzeexportlogs.sh +++ b/compose/openshiftjobs/scripts/analyzeexportlogs.sh @@ -75,7 +75,7 @@ if [ ${#zipped_files[@]} -gt 0 ]; then #Run goaccess on all the log files from the date entered goaccess_report_name=$start_time_formatted-goaccess_report.html - zcat "${zipped_files[@]}" | goaccess - -o "$goaccess_report_name" --log-format='~h{, } %e %^[%x] "%r" %s %b "%R" "%u" %C "%M" %T' --datetime-format='%d/%b/%Y:%H:%M:%S %z' --ignore-panel=REMOTE_USER --ignore-panel=ASN --tz=America/Vancouver --jobs=2 --geoip-database=$mmdb_file + zcat "${zipped_files[@]}" | grep -v '^-\s' | goaccess - -o "$goaccess_report_name" --log-format='~h{, } %e %^[%x] "%r" %s %b "%R" "%u" %C "%M" %T' --datetime-format='%d/%b/%Y:%H:%M:%S %z' --ignore-panel=REMOTE_USER --ignore-panel=ASN --tz=America/Vancouver --jobs=2 --geoip-database=$mmdb_file echo "GoAccess report generated successfully at $goaccess_report_name" # Get the start date formated in YYYY/MM/DD format