Input File Path ignores directories and gathering all the files

Hello,

I have a problem with Input -> File plugin.
On a fresh install I created index of bunch of csv files located in one directory. Works fine.
Then I made neighboring directory with other csv files set. Made new config and new index. Unfortunately new index includes new files and old files from the first directory despite of explicit path in config.
Where I'm wrong?

Configs:

cat /etc/logstash/conf.d/first.conf

   input {
    file {
    path => ["/home/admin-local/logs/*.csv"]
    start_position => "beginning"
    sincedb_path => "/dev/null"
      }
    }

     filter {
      csv {
       separator => ","
       columns => ["Date", "Build Number", "Subsystem", "Duration"]
         convert => {
         "Date" => "date_time"
         "Build Number" => "integer"
         "Duration" => "integer"
         }
     }
    }

    output {
     elasticsearch {
     hosts => "http://localhost:9200"
     index => "first-01"
    }
   }

cat /etc/logstash/conf.d/test.conf

input {
  file {
    path => ["/home/admin-local/test/*.csv"]
    start_position => "beginning"
    sincedb_path => "/dev/null"
  }
}

filter {
          csv {
           separator => ","
           columns => ["Date", "Build Number", "Subsystem", "Duration"]
             convert => {
             "Date" => "date_time"
             "Build Number" => "integer"
             "Duration" => "date_time"
             }
         }
}

output {
   elasticsearch {
     hosts => "http://localhost:9200"
     index => "time-01"
  }
}

If you have configured logstash with '-f /etc/logstash/conf.d' then it will concatenate all of the configuration files in that directory, read events from the inputs and send them to all of the outputs.

You could use a different pipeline for each configuration, or you could use conditionals based on the path.

Thank you

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