Nginx error log parser

mohit Agrawal mohit3081989 at gmail.com
Wed Jan 10 11:45:32 UTC 2018


Yeah I have tried grok / regex pattern as well. But not extensive success
that I achieved. grok didn't work for me, I tried regex then it was able to
segregate time , pid, tid, log_level and message. I also need message break
up for above pattern

On 10 January 2018 at 17:12, Aziz Rozyev <arozyev at nginx.com> wrote:

> Hi Mohit,
>
> check the second reply. I’m not sure that there is a conventional pretty
> printing
> tools for nginx error log.
>
>
> br,
> Aziz.
>
>
>
>
>
> > On 10 Jan 2018, at 14:37, mohit Agrawal <mohit3081989 at gmail.com> wrote:
> >
> > Hi Aziz,
> >
> > log_format directive only provides formatting for access log, I am
> looking to format error.log which doesn't take log_format directive.
> > Above example that I gave is just for nginx error logs.
> >
> > Thanks
> >
> > On 10 January 2018 at 15:26, Aziz Rozyev <arozyev at nginx.com> wrote:
> > btw, after re-reading the your questing, it looks like you need
> something like logstash grok filter.
> >
> > br,
> > Aziz.
> >
> >
> >
> >
> >
> > > On 10 Jan 2018, at 11:45, mohit Agrawal <mohit3081989 at gmail.com>
> wrote:
> > >
> > > Hi ,
> > >
> > > 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 :
> > >
> > > 2018/01/10 06:26:31 [error] 13485#13485: *64285471 limiting
> connections by zone "rl_conn", client: xx.xx.xx.xx, server: www.xyz.com,
> request: "GET /api/xyz HTTP/1.1", host: "www.xyz.com"
> > > And the sample that I am looking for is :
> > >
> > > {client: "xx.xx.xx.xx", server: "www.xyz.com", host: "www.xyz.com",
> "request": "GET /api/xyz HTTP/1.1", reason: "limiting connections by zone
> "rl_conn""}
> > > so that I can pass it through ELK stack and find out the root ip which
> is causing issue.
> > >
> > >
> > > --
> > > Mohit Agrawal
> > > _______________________________________________
> > > nginx mailing list
> > > nginx at nginx.org
> > > http://mailman.nginx.org/mailman/listinfo/nginx
> >
> > _______________________________________________
> > nginx mailing list
> > nginx at nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx
> >
> >
> >
> > --
> > Mohit Agrawal
>
>


-- 
Mohit Agrawal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180110/85ead21a/attachment.html>


More information about the nginx mailing list