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
Format Errors with Caddy JSON #2626
Comments
I just updated as described on the Readme and the error still remains the same:
|
Thanks for giving me the heads up on this. Sounds like the default log format isn't quite right. Bummer that I missed it in today's v1.91 release. I'll make sure to include it in the next one. This probably ties into #2601. Anyway, are you able to submit a PR with the right format for this? The relevant lines are here and here. Thanks a bunch! |
I was setting up GoAccess for Caddy today and ran into this as well, but only when configuring Caddy's global log option and asking GoAccess to read it. If you setup only access logging on your domains it should work, and I think GoAccess's default Caddy configuration only expects these logs. Example Caddyfile:
If you have multiple domains, you can use snippets to make things easier. Then read the log with sudo goaccess /var/log/caddy/access.log --log-format=CADDY Tested with Caddy v2.7.6 and GoAccess 1.9.1. If the above still gives you any trouble, it might be helpful to include your Caddy version as well. I don't think this is related to #2601 exactly, which is its own issue that originates with Caddy receiving first-class support for logging client IPs (such as from 'X-Forwared-For' headers) where the typical user might want to see the |
Hey @Teqed, thanks for catching that and providing the details. I'm thinking, should we consider adding another predefined option for when it's configured globally, like maybe CADDY_GLOBAL? Thoughts? |
actually, looking at my response again, the global approach might be trickier since it doesn't appear to be a valid JSON string, as far as I can tell? |
I attached a censored example entry from a global debug level log.
|
I attached a censored example entry from a local debug level log.
|
As seen in my example I kinda compare oranges and apples. One is a debug level event the other one an info level event. |
@Robert-Ernst, I was looking at this and noticed some differences between fields like Are you still encountering any issues in the latest version? |
It works for me in the local info format. |
Appreciate the feedback. I've made the necessary updates to both the man page and the documentation on the website regarding the log-format configuration. Closing this, feel free to reopen it if necessary. |
While it's on my mind, I wanted to mention that I think there may be a way to configure logs globally the way we're expecting by including only access log events:
By using the It might also be useful for someone to consume Caddy's non- |
I confirm issues with Caddy JSON too. I'm new to the project and my first experience is that it's not working.
goaccess -V
GoAccess - 1.5.5.
OS:
Ubuntu 22.04.2 LTS
Command:
goaccess /docker/caddy/log/myLog.log --no-ip-validation --log-format CADDY
Relevant part of the Caddyfile
Output:
The text was updated successfully, but these errors were encountered: