Comments (8)
This should do it:
# goaccess access.log --log-format='[%x] %^ %s %^ %^ %m %^ %v "%U" [Client %h] [Length %b] [%^] [%e] "%u" "%R"' --datetime-format='%d/%b/%Y:%H:%M:%S %z' --tz=America/New_York --date-spec=min --http-protocol=no
Let me know how it goes.
from goaccess.
Hi,
No still doesn't work unfortunately.
I noticed you giving it to me in a CLI format, but i'm editing the goaccess.conf file, will it look the same?
I'm also getting an additional error: goaccess: unrecognized option: datetime-format
I see this when I run the docker logs goaccess
command
If I start it with only adjusting the log-format then I get:
Token '21/Feb/2024:15:37:08 +0000' doesn't match specifier '%x'
Current goaccess.conf file:
time-format %H:%M:%S
date-format %d/%b/%Y
log_format [%x] %^ %s %^ %^ %m %^ %v "%U" [Client %h] [Length %b] [%^] [%e] "%u" "%R"
real-time-html true
log-file /opt/log/proxy-host-1_access.log
log-file /opt/log/proxy-host-2_access.log
log-file /opt/log/proxy-host-3_access.log
log-file /opt/log/proxy-host-4_access.log
log-file /opt/log/proxy-host-5_access.log
date-spec min
http-protocol no
from goaccess.
OK, so it turns out the docker image I have been using was actually pulled from gregyankovoy/goaccess
So I think that is my first issue?
When I tried follwing the instrucions here, to create a new image, none of it works.
If i try build from github i get errors running autoreconf -fiv
as per instruction:
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: running: autopoint --force
Can't exec "autopoint": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 293.
autoreconf: error: autopoint failed with exit status: 2
If i try compile GoAccess and run ./configure --enable-utf8 --enable-geoip=mmdb
then i get errors:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking for cc... no
checking for gcc... no
checking for clang... no
configure: error: in `/opt/goaccess-1.5.1':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
Following the docker instructions makes no sense to me.
Do I browse to where the nginx logs are and run it from that directory?
So perhaps I just need to get it running properly from this github repository.
from goaccess.
So I finally got it installed and by compiling it through wget https://tar.goaccess.io/goaccess-1.9.1.tar.gz
used the same goaccess.conf configuration located at /usr/local/etc/goaccess/goaccess.conf
time-format %H:%M:%S
date-format %d/%b/%Y
log_format [%x] %^ %s %^ %^ %m %^ %v "%U" [Client %h] [Length %b] [%^] [%e] "%u" "%R"
real-time-html true
log-file /opt/nginxproxymanager/data/logs/proxy-host-1_access.log
log-file /opt/nginxproxymanager/data/logs/proxy-host-2_access.log
log-file /opt/nginxproxymanager/data/logs/proxy-host-3_access.log
log-file /opt/nginxproxymanager/data/logs/proxy-host-4_access.log
log-file /opt/nginxproxymanager/data/logs/proxy-host-5_access.log
log-file /opt/nginxproxymanager/data/logs/proxy-host-6_access.log
date-spec min
http-protocol no
now i'm getting the errors when running ./goaccess from where i compiled it (/opt/goaccess-1.9.1)
Cleaning up resources...
==11725== GoAccess - version 1.9.1 - Feb 24 2024 10:14:31
==11725== Config file: /usr/local/etc/goaccess/goaccess.conf
==11725== https://goaccess.io - <[email protected]>
==11725== Released under the MIT License.
==11725==
==11725== Released under the MIT License.
==11725==
==11725== FILE: /opt/nginxproxymanager/data/logs/proxy-host-1_access.log
==11725== Parsed 10 lines producing the following errors:
==11725==
==11725== Token '21/Feb/2024:15:37:08 +0000' doesn't match specifier '%x'
==11725== Token '21/Feb/2024:15:37:12 +0000' doesn't match specifier '%x'
==11725== Token '21/Feb/2024:15:37:15 +0000' doesn't match specifier '%x'
==11725== Token '21/Feb/2024:15:37:36 +0000' doesn't match specifier '%x'
==11725== Token '21/Feb/2024:15:37:37 +0000' doesn't match specifier '%x'
==11725== Token '21/Feb/2024:19:40:58 +0000' doesn't match specifier '%x'
==11725== Token '21/Feb/2024:19:40:58 +0000' doesn't match specifier '%x'
==11725== Token '21/Feb/2024:19:41:05 +0000' doesn't match specifier '%x'
==11725== Token '21/Feb/2024:19:41:05 +0000' doesn't match specifier '%x'
==11725== Token '21/Feb/2024:19:41:05 +0000' doesn't match specifier '%x'
==11725==
==11725== Format Errors - Verify your log/date/time format
from goaccess.
Seems like your strptime/strftime version doesn't support %z (time zone). What Linux distribution and kernel are you running? You might want to give this a shot instead:
# goaccess access.log --log-format='[%d:%t %^] %^ %s %^ %^ %m %^ %v "%U" [Client %h] [Length %b] [%^] [%e] "%u" "%R"' --datetime-format=%d/%b/%Y --time-format=%T --date-spec=min --http-protocol=no
from goaccess.
I’m running Ubuntu server 22.04 LTS
I’ll try the format and let you know.
Appreciate the assist.
from goaccess.
This brings me back to my original issue:
Cleaning up resources...
==11970== GoAccess - version 1.9.1 - Feb 24 2024 10:14:31
==11970== Config file: /usr/local/etc/goaccess/goaccess.conf
==11970== https://goaccess.io - <[email protected]>
==11970== Released under the MIT License.
==11970==
==11970== FILE: /opt/nginxproxymanager/data/logs/proxy-host-1_access.log
==11970== Parsed 20 lines producing the following errors:
==11970==
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970== Token '-' doesn't match specifier '%s'
==11970==
==11970== Format Errors - Verify your log/date/time format
Linux version:
Linux ubuntu 5.15.0-97-generic #107-Ubuntu SMP Wed Feb 7 13:26:48 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
from goaccess.
OK, so I finally got it running.
goaccess.conf:
datetime-format %d/%b/%Y:%H:%M:%S %z
log_format [%x] %^ %s %^ %^ %m %^ %v "%U" [Client %h] [Length %b] [%^] [%e] "%u" "%R"
real-time-html true
log-file /opt/nginxproxymanager/data/logs/proxy-host-1_access.log
log-file /opt/nginxproxymanager/data/logs/proxy-host-2_access.log
log-file /opt/nginxproxymanager/data/logs/proxy-host-3_access.log
log-file /opt/nginxproxymanager/data/logs/proxy-host-5_access.log
log-file /opt/nginxproxymanager/data/logs/proxy-host-6_access.log
date-spec min
http-protocol no
For this to work I had to edit my /usr/share/i18n/locales/en_US
and match it with the format used by %x
Under LC_TIME:
% Appropriate date representation (%x)
d_fmt "%d//%b//%Y"
Hope this helps someone else.
from goaccess.
Related Issues (20)
- Token '- [03/Apr/2024' doesn't match specifier '%d' HOT 1
- Docker - build development binary in isolated container: error while loading shared libraries: libcrypto.so.1.1 HOT 4
- Restore the capability to modify log/date/time formats in the TUI format dialog HOT 1
- How to hide paths duplicated based on protocol HOT 7
- Feature request: Report should contain histogram of countries requests are comming from HOT 1
- Visitors geolocation map in v.1.9.2: numbers format on the scale bar under the map HOT 4
- memory usage limit HOT 5
- How to respect Licensing terms of db-ip.com? HOT 1
- TX and Requests wrong with incremental processing HOT 26
- Question about --enable-panel HOT 5
- 'Error opening terminal: xterm' using docker image HOT 2
- Incremental processing of piped data HOT 4
- Unique AppPrefs for different html files
- Trying to figure out " Token for '%s' specifier is NULL."
- deb.goaccess.io for Ubuntu 24.04 noble fails HOT 2
- Nginx log format not working in Goaccess HOT 3
- Can't implement GoAccess with Zeek. Wrong format. HOT 2
- Logging Format Question - HAProxy
- Browsers an operating systems aren't recognized HOT 2
- Plans to track other search engines such as Yahoo, Bing, Duckduckguo etc. in addition to Google? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goaccess.