Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISO8601 date format (goaccess 0.6.1) #48

Closed
mortn opened this issue Nov 8, 2013 · 2 comments
Closed

ISO8601 date format (goaccess 0.6.1) #48

mortn opened this issue Nov 8, 2013 · 2 comments

Comments

@mortn
Copy link

mortn commented Nov 8, 2013

I have configured our nginx servers to use the $iso8601 (ISO 8601) date format, but GoAccess seems unable to understanding that format.

In the .goaccessrc I defined the date format as %FT%T%**:**z but it seems like the colon is ignored and I just get the error

An error has occurred
Error occured at: goaccess.c - render_screens - 318
Message: Nothing valid to process.

When I change .goaccessrc date format to %FT%T%z (without : before z) I can do a

bash# cat logfile | sed 's/(+.):(.)]/\1\2]/' | goaccess

I get the expected output when running

bash# date +%FT%T%:z

@allinurl
Copy link
Owner

allinurl commented Nov 8, 2013

@MortenAbildgaard assuming your log looks something like this:

87.144.215.74 - - [2011-03-21T18:52:25+03:00] "GET /Azeroth/base.png HTTP/1.1" 200 10539 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9) AppleWebKit/537.71 (KHTML, like Gecko)"

Then the following should do it:

color_scheme 1
date_format %F
log_format %h %^[%dT%^] "%r" %s %b "%R" "%u"

Let me know if that works for you.

@mortn
Copy link
Author

mortn commented Nov 8, 2013

Yes, it works! Thank you very much!

@mortn mortn closed this as completed Nov 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants