Filebeat config for nginx access & error logs


(Aarish Ramesh) #1

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

Is there anything wrong with the filebeat config ?


(ruflin) #2

Why did you open a new topic?


(Aarish Ramesh) #3

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 ?


(system) #4

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