I have multiple configurations that need to be forwarded to ES, so I am trying to add type in the input configuration. In the output configuration, forwarding to different places based on different type values does not take effect。
eg:
input {
rocketmq {
namesrv_addr => "xxxxx"
topic => "xx"
group => "xx"
sub_expression => "xx"
type => "test"
}
}
output {
if [type] == "test" {
elasticsearch {
hosts => "xxxx"
index => "xx-%{+YYYY}"
user => "xx"
password => "xx"
template_overwrite => true
template => "/../xx.json"
template_name => "xxx"
}
stdout {
codec => rubydebug {
}
}
}
}
I have multiple configurations that need to be forwarded to ES, so I am trying to add type in the input configuration. In the output configuration, forwarding to different places based on different type values does not take effect。 eg: input { rocketmq { namesrv_addr => "xxxxx" topic => "xx" group => "xx" sub_expression => "xx" type => "test" } } output { if [type] == "test" { elasticsearch { hosts => "xxxx" index => "xx-%{+YYYY}" user => "xx" password => "xx" template_overwrite => true template => "/../xx.json" template_name => "xxx" } stdout { codec => rubydebug { } } } }