Skip to content

Commit

Permalink
Fixed filenames on goaccess script
Browse files Browse the repository at this point in the history
  • Loading branch information
catttam committed Sep 10, 2024
1 parent 4ebe551 commit e627956
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions extract_goaccess_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ addLog(){

metrics(){
LOG_FILE=$1
geo_err=$( { goaccess "${LOG_FILE}" --log-format="${LOG_FORMAT}" -o "${OUTPUTS_PATH}/${LOG_FILE}_full.json" --json-pretty-print; } 2>&1 )
python3 goaccess_metric_parser.py -f "${OUTPUTS_PATH}/${LOG_FILE}_full.json" -g 0
filename=`basename "$LOG_FILE"`
geo_err=$( { goaccess "${LOG_FILE}" --log-format="${LOG_FORMAT}" -o "${OUTPUTS_PATH}/${filename}_full.json" --json-pretty-print; } 2>&1 )
python3 goaccess_metric_parser.py -f "${OUTPUTS_PATH}/${filename}_full.json" -g 0

status_codes=('200' '204' '404' '500')
init="t"

out="${FILTERED_PATH}/${LOG_FILE}"
out="${FILTERED_PATH}/${filename}"

for code in "${status_codes[@]}"; do
code_logs=$(cat $LOG_FILE| grep -e 'HTTP/[0-9].[0-9]" '${code}' ')
Expand Down

0 comments on commit e627956

Please sign in to comment.