Snažím sa vytvárať nové výstup indexu pomocou 3 vstup index. V new výstup index potrebujem na vyplnenie špecifických polí z textu index. Snažím sa vytvoriť nové pole pomocou add_field.to je tvrdé-kódovanie like '%{[index1name][field1inIndex1]} " namiesto osídľujúcich hodnoty indexu. Snažil som sa pod kód:
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
}
}