Why logstash merge index of 3 different config?

i ve 3 config but i see the 3 index is similar why ?

all index contais info all 3 index

this is my type config

is different for path and name index in ** lines

input {
  file {

    **path => [ "/logstash_dir/federico2/p1/*.*" ]**
    
    
    start_position => "beginning"

     #sincedb_path => "/dev/null"

    codec => multiline {
          pattern => "^%{TIMESTAMP_ISO8601} "
          negate => true
          what => "previous"
        }



  }
}


output {
 		elasticsearch {
			hosts => ["elkserver:9200"]
			**index => "p1-%{+YYYY.MM.dd}"**
		}
   
		stdout { codec => rubydebug }
}

If you provide a directory to Logstash that contains a number of configuration files, these will all be concatenated into a single pipeline unless you explicitly specify multiple pipelines or control filter access through conditionals. Without this data from ALL inputs will therefore be processed by ALL filters and go to ALL outputs.

ok is possible filter by log path type ?

if "/logstash_dir/P1/" in [file.path] {
		elasticsearch {
			hosts => ["elasticsearch:9200"]
			index => "p1"
		}
}

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