Welcome! Log In Create A New Profile

Advanced

logging nginx to syslog on port

March 18, 2015 10:32AM
Hi on my local system i have configured rsyslog and nginx.
i want all error logs should to go to syslog over the port no : 10514

my configuration for rsyslog.conf is.:
it is running fine showing no error:, but when i run any page on local host which is not there, the error are not appearing appaering in out.log
------------------------------------------------------

module(load="imptcp" )

template(name="t" type="string" string="=====NEW=======\n%msg%\n\n\n%$.foo%\n\n=======END=====\n")

module(load="mmnormalize")
module(load="mmjsonparse")

ruleset(name="r") {

action(type="omfile" name="jj_out_1" file="out.log" template="t")

}

and nginx,cong is configured this way: nginx-1.7.10
-------------------------------------------------------
http {
include mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log logs/access.log main;
error_log syslog:server=localhost:10514,facility=local7,tag=nginx,severity=info;
----------------------------------

please help in debugging.
Subject Author Posted

logging nginx to syslog on port

vihaan March 18, 2015 10:32AM

Re: logging nginx to syslog on port

vihaan March 18, 2015 01:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 146
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