<div dir="ltr">Hi Aziz,<div><br></div><div>log_format directive only provides formatting for access log, I am looking to format error.log which doesn't take log_format directive. </div><div>Above example that I gave is just for nginx error logs.</div><div><br></div><div>Thanks</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 10 January 2018 at 15:26, Aziz Rozyev <span dir="ltr"><<a href="mailto:arozyev@nginx.com" target="_blank">arozyev@nginx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">btw, after re-reading the your questing, it looks like you need something like logstash grok filter.<br>
<span class="im HOEnZb"><br>
br,<br>
Aziz.<br>
<br>
<br>
<br>
<br>
<br>
> On 10 Jan 2018, at 11:45, mohit Agrawal <<a href="mailto:mohit3081989@gmail.com">mohit3081989@gmail.com</a>> wrote:<br>
><br>
</span><div class="HOEnZb"><div class="h5">> Hi ,<br>
><br>
> I am looking to parse nginx error log so as to find out which particular IP is throttled during specific amount of time on connection throttling / request throttling. The format looks like :<br>
><br>
> 2018/01/10 06:26:31 [error] 13485#13485: *64285471 limiting connections by zone "rl_conn", client: xx.xx.xx.xx, server: <a href="http://www.xyz.com" rel="noreferrer" target="_blank">www.xyz.com</a>, request: "GET /api/xyz HTTP/1.1", host: "<a href="http://www.xyz.com" rel="noreferrer" target="_blank">www.xyz.com</a>"<br>
> And the sample that I am looking for is :<br>
><br>
> {client: "xx.xx.xx.xx", server: "<a href="http://www.xyz.com" rel="noreferrer" target="_blank">www.xyz.com</a>", host: "<a href="http://www.xyz.com" rel="noreferrer" target="_blank">www.xyz.com</a>", "request": "GET /api/xyz HTTP/1.1", reason: "limiting connections by zone "rl_conn""}<br>
> so that I can pass it through ELK stack and find out the root ip which is causing issue.<br>
><br>
><br>
> --<br>
> Mohit Agrawal<br>
</div></div><div class="HOEnZb"><div class="h5">> ______________________________<wbr>_________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
<br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Mohit Agrawal<br></div></div></div></div>
</div>