Skip to content

Instantly share code, notes, and snippets.

@corentinbettiol
Last active August 24, 2023 12:21
Show Gist options
  • Save corentinbettiol/b65239f12d9262b5a50ebe99e3ce0e45 to your computer and use it in GitHub Desktop.
Save corentinbettiol/b65239f12d9262b5a50ebe99e3ce0e45 to your computer and use it in GitHub Desktop.

Revisions

  1. corentinbettiol revised this gist Aug 24, 2023. 1 changed file with 5 additions and 4 deletions.
    9 changes: 5 additions & 4 deletions goaccess.sh
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,15 @@
    awk '$8=$1$8' \
    tail -q -n +0 -f \
    /var/log/apache2/logs-for-website-1.log \
    /var/log/apache2/logs-for-website-2.log \
    /var/log/apache2/logs-for-website-3.log \
    /var/log/apache2/logs-for-website-4.log | \
    goaccess \
    /var/log/apache2/logs-for-website-4.log \
    | awk '$8=$1$8' \
    | goaccess \
    --log-format='%v %h %l %u [%d:%t +%^] \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"' \
    --date-format=%d/%b/%Y \
    --time-format=%T \
    --anonymize-ip \
    --anonymize-level=2 \
    --html-report-title="Global stats" \
    --html-refresh=15 -o /var/www/html/stats/index.html \
    --real-time-html -
    --real-time-html -
  2. corentinbettiol revised this gist Aug 24, 2023. No changes.
  3. corentinbettiol created this gist Aug 24, 2023.
    14 changes: 14 additions & 0 deletions goaccess.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    awk '$8=$1$8' \
    /var/log/apache2/logs-for-website-1.log \
    /var/log/apache2/logs-for-website-2.log \
    /var/log/apache2/logs-for-website-3.log \
    /var/log/apache2/logs-for-website-4.log | \
    goaccess \
    --log-format='%v %h %l %u [%d:%t +%^] \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"' \
    --date-format=%d/%b/%Y \
    --time-format=%T \
    --anonymize-ip \
    --anonymize-level=2 \
    --html-report-title="Global stats" \
    --html-refresh=15 -o /var/www/html/stats/index.html \
    --real-time-html -