내가 만들려고 새로운 출력 지수를 사용하여 입력 3 인덱스입니다. 에서 새로운 출력 지수가 필요를 채우는 몇 가지 특정 필드를 입력 index. 내가 만들려고 새로운 분야를 사용하여 add_field.그것은 하드 코딩'처럼%{[index1name][field1inIndex1]}'대신에 채우는 값에서 인덱스입니다. 가 아래 코드:
input
{
elasticsearch{
hosts => ["hostname"]
index => "index1"
query => '{"query":{"match_all":{}}}'
docinfo => "true"
user => "uname"
password =>"pwd"
ssl=>"true"
}
elasticsearch {
#same like above for index2
}
elasticsearch {
#same like above for index3
}
}
filter
{
mutate
{
add_field =>["newfieldname","%{[index1][fieldinindex1]}"]
}
}
output
{
elasticsearch {
#creating new index here
}
}