# NGINX - restructure logging to match nginx module

**URL:** <https://discuss.elastic.co/t/nginx-restructure-logging-to-match-nginx-module/240415>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 8, 2020, 5:46pm UTC](https://discuss.elastic.co/t/nginx-restructure-logging-to-match-nginx-module/240415 "2020-07-08T17:46:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikki/32/71831_2.png) [@Mikki](https://discuss.elastic.co/u/Mikki)\
**Post date:** [July 8, 2020, 5:46pm UTC](https://discuss.elastic.co/t/nginx-restructure-logging-to-match-nginx-module/240415/1 "2020-07-08T17:46:39Z")

</div>

Im trying to ingest a custom logformat from nginx

```auto
log_format main '$remote_addr - $http_x_forwarded_for - $http_true_client_ip - $remote_user [$time_local] "$host" "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $request_time';

```

Can I structure it differntly so the nginx module will ingest the same fields but without modifying the grok pattern?

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [July 9, 2020, 2:27pm UTC](https://discuss.elastic.co/t/nginx-restructure-logging-to-match-nginx-module/240415/2 "2020-07-09T14:27:44Z")

</div>

The NGINX module uses the default logging format of the service. If you want any additional data you probably need to update the pipeline for yourself.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 6, 2020, 4:27pm UTC](https://discuss.elastic.co/t/nginx-restructure-logging-to-match-nginx-module/240415/3 "2020-08-06T16:27:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
