How to handle different logs in logstash server


currently,,I want to send nginx_access.log and nginx_error.log to logstash is the filebeat.yml configuration,I don't know whether I am right or not.

and this is the nginx_access log format:

eeeeee.............I don't know how to configure logstash.conf in logstash server,to separate them and treat different logs in different ways.

this configuration above is the wrong my example ....I searched a lot,still don't get a clue.
appreciate a lot ,if you could help

(Mark Walkom) #2

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them.

(Magnus B├Ąck) #3

You're on the right track with the conditional, but you can't wrap just codec => "json" since that's not a filter. Instead, wrap a json filter with your conditional:

if ... {
  json {
    source => "message"


oh! really thanks .solved my problem so easily:smiley:

(system) #5

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