# Filebeat config for nginx access & error logs

**URL:** <https://discuss.elastic.co/t/filebeat-config-for-nginx-access-error-logs/84933>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 8, 2017, 12:59pm UTC](https://discuss.elastic.co/t/filebeat-config-for-nginx-access-error-logs/84933 "2017-05-08T12:59:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aarishramesh](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@aarishramesh](https://discuss.elastic.co/u/aarishramesh)\
**Post date:** [May 8, 2017, 12:59pm UTC](https://discuss.elastic.co/t/filebeat-config-for-nginx-access-error-logs/84933/1 "2017-05-08T12:59:46Z")

</div>

I am configuring filebeat in nginx to send access & error logs to logstash for which I am defining two separate prospectors like below

```
filebeat.prospectors:

# Each - is a prospector. Most options can be set at the prospector level, so
# you can use different prospectors for various configurations.
# Below are the prospector specific configurations.

- input_type: log
  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    - /var/log/nginx/access.log
  document_type: nginx-access

- input_type: log
  paths:
    - /var/log/nginx/error.log
  document_type: nginx-error

```

But it does not seem to be working as only access logs are harvested. This issue is already discussed by in a separate topic [Filebeat config for nginx logs](https://discuss.elastic.co/t/filebeat-config-for-nginx-logs/84540) in which I have shared the complete filebeat.yml

Is there anything wrong with the filebeat config ?

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [May 9, 2017, 9:35am UTC](https://discuss.elastic.co/t/filebeat-config-for-nginx-access-error-logs/84933/2 "2017-05-09T09:35:16Z")

</div>

Why did you open a new topic?

---

<div class="post-metadata">

**Author:** ![aarishramesh](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@aarishramesh](https://discuss.elastic.co/u/aarishramesh)\
**Post date:** [May 9, 2017, 9:45am UTC](https://discuss.elastic.co/t/filebeat-config-for-nginx-access-error-logs/84933/3 "2017-05-09T09:45:29Z")

</div>

I got it solved. Will edit the post. Btw Can you please take a look at this new topic [Filebeat multiline codec not working in my case](https://discuss.elastic.co/t/filebeat-multiline-codec-not-working-in-my-case/85040) ?

---

<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 6, 2017, 9:46am UTC](https://discuss.elastic.co/t/filebeat-config-for-nginx-access-error-logs/84933/4 "2017-06-06T09:46:47Z")

</div>

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