# Custom url wise log for nginx

**URL:** <https://community.netdata.cloud/t/custom-url-wise-log-for-nginx/4953>\
**Category:** Help\
**Tags:** linux, platform\
**Created:** [December 9, 2023, 6:07am UTC](https://community.netdata.cloud/t/custom-url-wise-log-for-nginx/4953 "2023-12-09T06:07:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saumil\_Shah](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/saumil_shah/32/3346_2.png) [@Saumil\_Shah](https://community.netdata.cloud/u/Saumil_Shah)\
**Post date:** [December 9, 2023, 6:07am UTC](https://community.netdata.cloud/t/custom-url-wise-log-for-nginx/4953/1 "2023-12-09T06:07:05Z")

</div>

I want to configure netdata to aggregate logs and display URL wise data for api latency  
api count and request body / response body.

I couldn’t find a way to do it.  
My nginx log format is :

```auto
log_format ltsv "time:$time_local"
                "\thost:$remote_addr"
                "\tforwardedfor:$http_x_forwarded_for"
                "\turi:$request_uri"
                "\tstatus:$status"
                "\tsize:$body_bytes_sent"
                "\treferer:$http_referer"
                "\tua:$http_user_agent"
                "\treqtime:$request_time"
                "\tcache:$upstream_http_x_cache"
                "\truntime:$upstream_http_x_runtime"
                "\tvhost:$host";

    access_log /var/log/nginx/ltsv.log ltsv;

```

My netdata web\_log.conf is

```auto
  # LTSV Log
  - name: ltsv logger
    path: /var/log/nginx/ltsv.log
    log_type: ltsv
    ltsv_config:
        mapping:
            uri: uri

```

I cannot get this to work.

Any help appriciated.

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [December 15, 2023, 3:03pm UTC](https://community.netdata.cloud/t/custom-url-wise-log-for-nginx/4953/2 "2023-12-15T15:03:44Z")

</div>

Hey, @Saumil_Shah. See [Known Fields](https://github.com/netdata/go.d.plugin/tree/master/modules/weblog#options), you need to map your keys to known fields, so it should be

```auto
        mapping:
            uri: request_uri

```

Also, if there is something doesn’t work consider using [Debug mode](https://github.com/netdata/go.d.plugin/tree/master/modules/weblog#debug-mode). In the debug mode plugins print a lot of information that help identify problems.

If you still can’t make it work share a few nging log lines and the debug output.
