# Help needed for setup.template.append\_fields usage

**URL:** <https://discuss.elastic.co/t/help-needed-for-setup-template-append-fields-usage/183701>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 31, 2019, 10:09am UTC](https://discuss.elastic.co/t/help-needed-for-setup-template-append-fields-usage/183701 "2019-05-31T10:09:39Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Georgios\_Gkinis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/georgios_gkinis/32/47225_2.png) [@Georgios\_Gkinis](https://discuss.elastic.co/u/Georgios_Gkinis)\
**Post date:** [May 31, 2019, 10:09am UTC](https://discuss.elastic.co/t/help-needed-for-setup-template-append-fields-usage/183701/1 "2019-05-31T10:09:39Z")

</div>

I am trying to add fields to filebeat but cannot get it working. When my logs are indexed i cannot find the 'resource' field within my access or error logs from nginx.

I have deleted all filebeat indexes and templates from the kibana console using  
**DELETE filebeat-** \* and **DELETE \_template/filebeat-6.8.0**

Can someone point out what I am doing wrong?

filebeat.yml:

```auto
#==================== Elasticsearch template setting ==========================

setup.template.settings:
  index.number_of_shards: 3
  #index.codec: best_compression
  #_source.enabled: false

setup.template.overwrite: true
setup.template.append_fields:
  - name: nginx.resource
    type: keyword

```

/modules.d/nginx.yml :

```auto
- module: nginx
  resource: 'azn'
  # Access logs
  access:
   enabled: true
   var.paths: ["/path/to/azn/root_access.log"]

  # Error logs
  error:
   enabled: true
   var.paths: ["/path/to/azn/error.log"]

```

---

_[View the full topic](https://discuss.elastic.co/t/help-needed-for-setup-template-append-fields-usage/183701)._
