-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Empty "ENCRYPTION SETTINGS" panel with --log-format=CADDY and Caddy v2.7.4 #2564
Comments
Thank you for sharing this. Do you happen to know if this is the default field output or if it has been changed at some point? The current output you provided is:
However, the default in GoAccess includes "cipher_suite" and "proto". In any event, the following should still function properly:
|
Thank your for your help @allinurl. The first JSON posted above is the default field output of Caddy v2.7.4. with "tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"http/1.1","server_name":"arm.stbu.net"} Using the GoAccess v1.8.0 with `--caddy-format=CADDY" wasn't working. $ /home/stbu/goaccess --version | grep GoAccess
GoAccess - 1.8.
$ echo '{"level":"info","ts":1696325286.9971106,"logger":"http.log.access.arm.stbu.net","msg":"handled request","request":{"remote_ip":"46.101.122.201","remote_port":"39062","client_ip":"46.101.122.201","proto":"HTTP/1.1","method":"GET","host":"arm.stbu.net","uri":"/","headers":{"Accept-Encoding":["gzip, deflate"],"User-Agent":["OhDear.app (+https://ohdear.app/docs/checks/uptime)"],"Accept":["*/*"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"http/1.1","server_name":"arm.stbu.net"}},"bytes_read":0,"user_id":"","duration":0.004788534,"size":32,"status":302,"resp_headers":{"Content-Type":["text/plain; charset=utf-8"],"Content-Length":["32"],"Date":["Tue, 03 Oct 2023 09:28:06 GMT"],"X-Frame-Options":["SAMEORIGIN"],"Location":["/dashboard"],"Server":["TheRock/2.0"],"Vary":["Accept"]}}' | \
/home/stbu/goaccess --log-format=CADDY -o /tmp/goaccess-caddy.html - Since the values of log access-json {
include http.log.access
output file log/access.json
format filter {
wrap json
fields {
request>tls>version tls_version TLSv
request>tls>cipher_suite tls_cipher
}
}
} and that produces this human friendly output (but the field labels are the same, just now strings instead of integers) "tls":{"resumed":false,"version":"TLSv1.3","cipher_suite":"TLS_AES_128_GCM_SHA256","proto":"http/1.1","server_name":"arm.stbu.net"} If I use your suggested echo '{"level":"info","ts":1696324268.7687688,"logger":"http.log.access.arm.stbu.net","msg":"handled request","request":{"remote_ip":"167.71.54.244","remote_port":"36770","client_ip":"167.71.54.244","proto":"HTTP/1.1","method":"GET","host":"arm.stbu.net","uri":"/","headers":{"Accept-Encoding":["gzip, deflate"],"User-Agent":["OhDear.app (+https://ohdear.app/docs/checks/uptime)"],"Accept":["*/*"]},"tls":{"resumed":false,"version":"TLSv1.3","cipher_suite":"TLS_AES_128_GCM_SHA256","proto":"http/1.1","server_name":"arm.stbu.net"}},"bytes_read":0,"user_id":"","duration":0.003010369,"size":32,"status":302,"resp_headers":{"Content-Length":["32"],"Date":["Tue, 03 Oct 2023 09:11:08 GMT"],"Server":["TheRock/2.0"],"X-Frame-Options":["SAMEORIGIN"],"Location":["/dashboard"],"Vary":["Accept"],"Content-Type":["text/plain; charset=utf-8"]}}' | \
/home/stbu/goaccess --log-format='{ "ts": "%x.%^", "request": { "remote_ip": "%h", "proto": "%H", "method": "%m", "host": "%v", "uri": "%U", "headers": { "User-Agent": [ "%u" ], "Referer": [ "%R" ] }, "tls": { "cipher_suite": "%k", "version": "%K" } }, "duration": "%T", "size": "%b", "status": "%s", "resp_headers": { "Content-Type": [ "%M" ] } }' --date-format=%s --time-format=%s -o /tmp/goaccess-caddy.html - So basically, the |
I have a question/problem with GoAccess (latest Docker Image) and Caddy v2.7.4 regarding the "ENCRYPTION SETTINGS" panel, which does not show any data.
My setup is latest Caddy v2.7.4 and GoAccess using the Docker Image - following this useful guide https://twitter.com/ALEMRANCU/status/1642337601578471424 (retweeted on the goaccess twitter page)
/var/log/caddy/goaccess.json --log-format=CADDY -o /var/www/goaccess/index.html --real-time-html --ws-url=wss://example.arm.stbu.net:443/ws --port=7890
By default, the JSON access logs from Caddy as of v2.7.4 are like these:
So the
%K
should be772
and%k
should be4865
.Or with the human readable values output using this Caddyfile (using github.com/caddyserver/transform-encoder)
which produces JSON access logs like this:
where the
%K
should beTLSv1.3
and%k
should beTLS_AES_128_GCM_SHA256
.But the ENCRYPTION SETTINGS panel in the real-time HTML is still not showing any data while all the other panels show data.
Any idea how to fix this? Has the Caddy JSON format maybe changed since the last update of the
--log-format=CADDY
definition?The text was updated successfully, but these errors were encountered: