Welcome! Log In Create A New Profile

Advanced

Re: Nginx remote access_log file

Reinis Rozitis
August 16, 2016 01:08PM
> How can i store the accsess_log Nginx file in the second machine ?
> Or how can i set the a Logstash remote input file ?
> Should I user an other tool like logsatsh-forwarder ?

You can just write the nginx access log via syslog directly to logstash (or
if you don't want that nginx writes something over network pretty much all
syslog daemons (syslog-ng, rsyslog etc) support of reading local files and
piping them to a remote listener).


A generic example:

1. define the input (to whatever port you prefer) in logstash config:

input {
udp {
port => 5000
type => syslog
}
}


2. point the nginx log to it:

access_log syslog:server=your.logstash.ip:5000;

(more details about tagging the messages etc in
http://nginx.org/en/docs/syslog.html )


rr

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx remote access_log file

khalifanizar August 16, 2016 11:56AM

Re: Nginx remote access_log file

Reinis Rozitis August 16, 2016 01:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 260
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready