We'd like to add an index based on which pattern was actually hit, which looks like this, but it won't work:
filter {
grok {
patterns_dir => "./patterns"
match => {
"message" => "%{A}"
}
add_field => { 'type' => 'A' }
}
grok {
patterns_dir => "./patterns"
match => {
"message" => "%{B}"
}
add_field => { 'type' => 'B' }
}
}