From 2792fa5b76255d81e256014dc0009bc7f17e2193 Mon Sep 17 00:00:00 2001 From: Clark Boylan <clark.boylan@gmail.com> Date: Tue, 10 Mar 2020 15:40:16 -0700 Subject: [PATCH] Simplify goaccess command This switches all log file input to stdin using a subshell to cat all the related log files. This makes the command a bit more consistent with itself. Change-Id: I99a8b0326f2a27c8497d616501fd9bed48678da8 --- playbooks/periodic/goaccess.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/periodic/goaccess.yaml b/playbooks/periodic/goaccess.yaml index 9b0dce80fc..90f3a207b3 100644 --- a/playbooks/periodic/goaccess.yaml +++ b/playbooks/periodic/goaccess.yaml @@ -55,6 +55,6 @@ SOURCE_FILE="/var/log/apache2/{{ goaccess_site }}_access.log" # This pipes in all the compressed logs as well as the current # uncompressed logs. Giving us a window as wide as our log retention. - zcat ${SOURCE_FILE}.*.gz | goaccess -o $OUT_FILE -p /home/zuul/goaccess.conf $SOURCE_FILE ${SOURCE_FILE}.1 - + ( cat ${SOURCE_FILE}{,.1} ; zcat ${SOURCE_FILE}.*.gz ) | goaccess -o $OUT_FILE -p /home/zuul/goaccess.conf - args: executable: /bin/bash