Skip to content

Commit 668f9a3

Browse files
v1.1.22-1
cleanup
1 parent efe6137 commit 668f9a3

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,19 @@ services:
153153
- SKIP_ARCHIVED_LOGS
154154
- the following file(s) are read and parsed.
155155
- access.log
156+
- You can also set the following environment variables yourself to override the defaults
157+
- TIME_FORMAT
158+
- DATE_FORMAT
159+
- LOG_FORMAT
160+
161+
```
162+
FOR EXAMPLE
163+
---------------------------------
164+
TIME_FORMAT=%H:%M:%S
165+
DATE_FORMAT=%Y-%m-%d
166+
LOG_FORMAT='{"ClientHost": "%h", "ClientUsername": "%e", "DownstreamContentSize": "%b", "Duration": "%n", "DownstreamStatus": "%s", "RequestAddr": "%v", "RequestMethod": "%m", "RequestPath": "%U", "RequestProtocol": "%H", "StartUTC": "%dT%t.%^", "request_User-Agent": "%u"}'
167+
``````
168+
156169
- NCSA_COMBINED
157170
- environment parameters that will not work and will be ignored
158171
- SKIP_ARCHIVED_LOGS
@@ -189,6 +202,7 @@ date-format %d/%b/%Y
189202
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u" %Lm"
190203
```
191204
205+
192206
# **Possible/Known Issues**
193207
- A lot of CPU Usage and 10000 request every second in webUI
194208
- https://github.com/xavier-hernandez/goaccess-for-nginxproxymanager/issues/38

resources/scripts/logs/traefik.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,9 @@ function traefik_goaccess_config(){
3232
echo "# ${goan_version}" >> ${goan_config}
3333
echo "# GOAN_PROXY_CONFIG" >> ${goan_config}
3434
echo "######################################" >> ${goan_config}
35-
if [ "$1" -eq 2 ]; then
36-
echo "time-format ${TIME_FORMAT:-'%T'}" >> ${goan_config}
37-
echo "date-format ${DATE_FORMAT:-'%d/%b/%Y'}" >> ${goan_config}
38-
echo "log-format ${LOG_FORMAT:-'%h %^[%d:%t %^] \"%r\" %s %b \"%R\" \"%u\" %Lm'}" >> ${goan_config}
39-
else
40-
echo "time-format %T" >> ${goan_config}
41-
echo "date-format %d/%b/%Y" >> ${goan_config}
42-
echo "log-format %h %^[%d:%t %^] \"%r\" %s %b \"%R\" \"%u\" %Lm" >> ${goan_config}
43-
fi
35+
echo "time-format ${TIME_FORMAT:-'%T'}" >> ${goan_config}
36+
echo "date-format ${DATE_FORMAT:-'%d/%b/%Y'}" >> ${goan_config}
37+
echo "log-format ${LOG_FORMAT:-'%h %^[%d:%t %^] \"%r\" %s %b \"%R\" \"%u\" %Lm'}" >> ${goan_config}
4438
echo "port 7890" >> ${goan_config}
4539
echo "real-time-html true" >> ${goan_config}
4640
echo "output ${nginx_html}" >> ${goan_config}

resources/scripts/start.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ if [[ -z "${LOG_TYPE}" || "${LOG_TYPE}" == "NPM" || "${LOG_TYPE}" == "NPM+R" ||
7575
npm_redirect
7676
fi
7777
elif [[ "${LOG_TYPE}" == "TRAEFIK" ]]; then
78-
traefik 1
79-
elif [[ "${LOG_TYPE}" == "TRAEFIKv2" ]]; then
80-
traefik 2
78+
traefik
8179
elif [[ "${LOG_TYPE}" == "NCSA_COMBINED" ]]; then
8280
ncsa_combined
8381
elif [[ "${LOG_TYPE}" == "CUSTOM" ]]; then

0 commit comments

Comments
 (0)