Logstash filter plugin

Hi

I'm using logstash 7.0 . I'm having multiple events to filter. Instead of having one single config file, I prefer to have multiple filter config files for each event. As an example, I'm having a login event and I store that filter config in separate file.
I wish to give file path in filter as below

filter
{
if [I]=="login_event"
{
file {
path => "/home/logstash/config/login_event.txt"
}
}
else if[I] == "other_event"
{
file {
path => "/home/logstash/config/other_event.txt"
}
}
}

but I saw there is no file plugin available in filter. Is there any other way

The best way is to use logstash pipelines.

But, all files in logtash/conf.d are read in order to build the config, so just use files like these, containing fragments of the total config.

00-input
01-filter-login
02-filter-other
99-output

There is no only me

But I'm having a conditional behavior for login & other which is inside filter. How to achieve that?? Also should I create this conf.d??

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