Welcome! Log In Create A New Profile

Advanced

Re: Feature Request for access_log stdout;

Aleksandar Lazic
February 18, 2016 06:58PM
Hi.

Am 18-02-2016 15:02, schrieb Aleksandar Lazic:
> Hi Andrew.
>
> Am 18-02-2016 10:16, schrieb Andrew Hutchings:

[snipp]

>>> What version of Docker are you running? If it is prior to 1.9 you are
>>> likely to hit his bug: https://github.com/docker/docker/issues/6880
>
> ####
> docker version
> Client:
> Version: 1.8.2-el7
> API version: 1.20
> Package Version: docker-1.8.2-10.el7.x86_64
> Go version: go1.4.2
> Git commit: a01dc02/1.8.2
> Built:
> OS/Arch: linux/amd64
>
> Server:
> Version: 1.8.2-el7
> API version: 1.20
> Package Version:
> Go version: go1.4.2
> Git commit: a01dc02/1.8.2
> Built:
> OS/Arch: linux/amd64
> ####
>
>> Also, as Valentin mentioned. Performance of any application, not just
>> NGINX, that logs a lot of data is going to be terrible when you
>> actually manage to do this.
>
> I have received some suggestions on haproxy list, which I will try.

I have try to setup the syslog entry with variables, but it looks to me
that this not implemented.

sed -e's/access_log.*/access_log
syslog:server=\$\{NGINX_TEST_PORT_8514_UDP_ADDR\}:\$\{NGINX_TEST_PORT_8514_UDP_PORT\};/'
/etc/nginx/nginx.conf > /tmp/nginx.conf

cat /tmp/nginx.conf

#####
user nginx;
worker_processes 1;

error_log stderr warn;
pid /tmp/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/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
syslog:server=${NGINX_TEST_PORT_8514_UDP_ADDR}:${NGINX_TEST_PORT_8514_UDP_PORT};

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

include /etc/nginx/conf.d/*.conf;
}
####

nginx -T -c /tmp/nginx.conf

nginx: [alert] could not open error log file: open()
"/var/log/nginx/error.log" failed (13: Permission denied)
2016/02/18 23:54:51 [warn] 12#12: the "user" directive makes sense only
if the master process runs with super-user privileges, ignored in
/tmp/nginx.conf:2
2016/02/18 23:54:51 [emerg] 12#12: invalid port in syslog server
"${NGINX_TEST_PORT_8514_UDP_ADDR}:${NGINX_TEST_PORT_8514_UDP_PORT}" in
/tmp/nginx.conf:22
nginx: configuration file /tmp/nginx.conf test failed

Any plans to add this possibility or have I missed something?

BR
Aleks

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

Feature Request for access_log stdout;

Aleksandar Lazic February 17, 2016 10:28AM

Re: Feature Request for access_log stdout;

Valentin V. Bartenev February 17, 2016 10:48AM

Re: Feature Request for access_log stdout;

Aleksandar Lazic February 17, 2016 02:06PM

Re: Feature Request for access_log stdout;

Andrew Hutchings February 18, 2016 04:46AM

Re: Feature Request for access_log stdout;

Andrew Hutchings February 18, 2016 04:56AM

Re: Feature Request for access_log stdout;

Aleksandar Lazic February 18, 2016 09:04AM

Re: Feature Request for access_log stdout;

Aleksandar Lazic February 18, 2016 06:58PM

Re: Feature Request for access_log stdout;

Konstantin Pavlov February 19, 2016 03:44AM

Re: Feature Request for access_log stdout;

Aleksandar Lazic February 21, 2016 02:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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