Combining Multiple Config Files

Hi,

How would I be able to combine multiple config files to push data to elasticsearch.

I currently have 2 csv files that have different column names and data results. I want to be able to run multiple config files and display results on Kibana.

Thanks,

kate

One approach is to put all the config files in a single directory and then you call logstash like this:

logstash -f path_to_directory

BUT, in order for this to work, in each config file you need to use types as shown below. Each config file must have a different type or else the config files will step on each other.

input {
 -your normal input settings-
 type => "my_type_1"
}

filter {
 if [type] == "my_type_1"{
  -your normal filter settings-
 }
}

output {
 if [type] == "my_type_1" {
  -your normal output settings-
 }
}

1 Like

Once that is set how do I run multiple config files on the same directory. They are all in the conf folder. When I run logstash -f "path to conf file" I get configuration file not found error.

That should do the trick. Hmm.

Are the config files all named with extension '.config' ?

Are there any files in that directory that aren't config files? I recall that causes a problem.

Are there any spaces in the directory path? If so, try enclosing the path in double-quotes or making an alias to that directory without spaces in it.

All have extension .Conf

Sorry, I'm not sure what the issue could be.

Nevermind issue is resolved.

What was the problem, it might help others in future if you can share it.