Filebeat syslog unix socket input doesn't work for Nginx

I'm trying to collect customized Nginx access logs via Filebeat using syslog unix socket type.
Filebeat 7.9.2:

- input_type: syslog
    path: "/var/log/nginx/nginx.sock"

Nginx 1.15.2:
access_log syslog:server=unix:/var/log/nginx/nginx.sock,tag=nginx_access mycustomformat;

From the Filebeat log I see Input is started successfully:
020-10-21T16:18:24.599+0300 INFO [unix] common/listener.go:87 Started listening for UNIX connection {"address": "/var/log/nginx/nginx.sock"}

Such configuration seems don't work, since in Nginx error.log I see the following:

2020/10/22 10:59:04 [alert] 29709#0: connect() failed (91: Protocol wrong type for socket)
2020/10/22 10:59:04 [warn] 29709#0: *82175 send() to syslog failed while logging request, client:, server: localhost, request: "GET /API/heartbeat HTTP/1.0", host: ""

I suspect this issue can be related to or to (some socket parameters need to be changed?)

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