Filebeat config for nginx access & error logs

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


# 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.
    - /var/log/nginx/access.log
  document_type: nginx-access

- input_type: log
    - /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 in which I have shared the complete filebeat.yml

Is there anything wrong with the filebeat config ?

Why did you open a new topic?

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 ?

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