# Elasticsearch output for filebeat to get only nginx logs

**URL:** <https://discuss.elastic.co/t/elasticsearch-output-for-filebeat-to-get-only-nginx-logs/272802>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 12, 2021, 11:41am UTC](https://discuss.elastic.co/t/elasticsearch-output-for-filebeat-to-get-only-nginx-logs/272802 "2021-05-12T11:41:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandeep4](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@Sandeep4](https://discuss.elastic.co/u/Sandeep4)\
**Post date:** [May 12, 2021, 11:41am UTC](https://discuss.elastic.co/t/elasticsearch-output-for-filebeat-to-get-only-nginx-logs/272802/1 "2021-05-12T11:41:12Z")

</div>

Hi Everyone,

Currently I see all kinds of logs in default logstash index, I have to channelize only nginx logs from filebeat to elastic search.

Tried by enabling nginx module, but that did not change anything.

Do we have to add anything in Elastic search output in filebeat.yml ? Anything like below can be added for nginx?

```
#-------------------------- Elasticsearch output ------------------------------
#output.elasticsearch:
  # Array of hosts to connect to.
# hosts: ["localhost:9200"]
output.kafka:
  hosts: ["10.0.0.121:9092"]
  topic: "filebeat"
  codec.json:
    pretty: false
```

---

<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:** [June 9, 2021, 11:41am UTC](https://discuss.elastic.co/t/elasticsearch-output-for-filebeat-to-get-only-nginx-logs/272802/2 "2021-06-09T11:41:58Z")

</div>

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