Logging all requests onNginx

classic Classic list List threaded Threaded
4 messages Options
aT
Reply | Threaded
Open this post in threaded view
|

Logging all requests onNginx

aT
HI , 

Is there a way to log all incoming requests on Nginx . 

Regardless of them being served or not . 

For example,  In case of surge of crawler hits , if the upstream backend cannot perform and requests hang  , nginx will not log any such failed request . 

How can we log them to have more detail on the surges of requests. 

Thanks




_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Logging all requests onNginx

Alex Samad
Will it not be logged as a timeout either in access or error/log ?

On 20 April 2017 at 03:46, aT <[hidden email]> wrote:
HI , 

Is there a way to log all incoming requests on Nginx . 

Regardless of them being served or not . 

For example,  In case of surge of crawler hits , if the upstream backend cannot perform and requests hang  , nginx will not log any such failed request . 

How can we log them to have more detail on the surges of requests. 

Thanks




_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Logging all requests onNginx

Jeff Dyke
untested, but if you set error_log to the correct level, it should log there as it likely received a > 300 response from the backends. I don't think you want these in your access logs, but i am suprised you don't get some sort of non < 400 response in those logs.  But it's been a long day....

On Wed, Apr 19, 2017 at 7:06 PM, Alex Samad <[hidden email]> wrote:
Will it not be logged as a timeout either in access or error/log ?

On 20 April 2017 at 03:46, aT <[hidden email]> wrote:
HI , 

Is there a way to log all incoming requests on Nginx . 

Regardless of them being served or not . 

For example,  In case of surge of crawler hits , if the upstream backend cannot perform and requests hang  , nginx will not log any such failed request . 

How can we log them to have more detail on the surges of requests. 

Thanks




_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Logging all requests onNginx

Jeff Dyke

On Wed, Apr 19, 2017 at 7:53 PM, Jeff Dyke <[hidden email]> wrote:
untested, but if you set error_log to the correct level, it should log there as it likely received a > 300 response from the backends. I don't think you want these in your access logs, but i am suprised you don't get some sort of non < 400 response in those logs.  But it's been a long day....

On Wed, Apr 19, 2017 at 7:06 PM, Alex Samad <[hidden email]> wrote:
Will it not be logged as a timeout either in access or error/log ?

On 20 April 2017 at 03:46, aT <[hidden email]> wrote:
HI , 

Is there a way to log all incoming requests on Nginx . 

Regardless of them being served or not . 

For example,  In case of surge of crawler hits , if the upstream backend cannot perform and requests hang  , nginx will not log any such failed request . 

How can we log them to have more detail on the surges of requests. 

Thanks




_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx



_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx