I am trying to use "type" for conditional filtering from two different inputs ,
Below is a simplified configuration
I dont get any data in my index using this file.
But if i simply remove "type" and conditions using "type"
everything works fine.
input {
beats {
port => "5043"
#type => ABC
type => "ABC"
}
}
filter {
if [type] == "ABC" {
grok {
match => {"message" => "%{TIMESTAMP_ISO8601} - \[%{NOTSPACE}\] %{LOGLEVEL} - %{JAVACLASS} \| %{WORD} %{URIPROTO}://%{URIHOST}/%{WORD:serviceName}-%{WORD}/%{WORD:entity}/%{BASE10NUM:id}, status = %{BASE10NUM:status}, time = %{BASE10NUM:duration} %{WORD:timeunits}."}
}
}
}
output {
if [type] == "ABC" {
elasticsearch {
hosts => [ "elastiSearchIp:9200" ]
index => "testlogs_1march"
}
}
}
Can some one please advice
Thankyou
Vikram