Skip to content

Commit

Permalink
Fixed paths
Browse files Browse the repository at this point in the history
  • Loading branch information
catttam committed Jul 16, 2024
1 parent fa22045 commit 4fe6a14
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions extract_goaccess_metrics.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Container paths
OUTPUTS_PATH="/app/metrics/rawmetrics"
FILTERED_PATH="$OUTPUTS_PATH/filtered_by_status_code"
OUTPUT_FILE="output"

OUTPUT_FILE="output_OSCAR_goaccess"
# Path to the readonly volume with the cluster's ingress logs
CLUSTER_LOGS_DIR="/var/log/clusterlogs"
LOCAL_LOGS_DIR="/var/log/ingresslogs"
Expand All @@ -21,13 +20,13 @@ addLog(){

metrics(){

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

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

out="${FILTERED_PATH}/${OUTPUT_FILE}_${FULL_REPORT_FILE}"
out="${FILTERED_PATH}/${OUTPUT_FILE}"

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

0 comments on commit 4fe6a14

Please sign in to comment.