Netdata collector for Caddy json logs

Hi,

I read that Netdata supports collecting JSON logs via Pandas. Does anyone have experience with that and could share their config files. The format seems to be rather complicated, so it would be good to have some examples to go from.

An update.

It turns out that Netdata has a webserver log parser that understands json. Initially, it didn’t parse the full nested structure of Caddy logs, but one of the developers was very helpful and fixed this issue.

Now we can visualise lots of Caddy webserver stats such as http status codes, unique visitors, bandwidth, request timings, etc. Stats can be aggregated or viewed per log, type, etc.

a basic configuration could be like this:
(./edit-config go.d/web_log.conf)

jobs:
  - name: caddy-wiki-tnonline-net
    path: /var/log/caddy/wiki.tnonline.net_443.log
    log_type: json
    json_config:
      mapping:
        server_name: host
        status: status
        ts: time_local
        size: bytes_sent
        bytes_read: bytes_received
        duration: request_time
        request.uri: request_uri
        request.proto: server_protocol
        request.method: request_method
        request.remote_ip: remote_addr

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.