Snažím se vytvořit nový výstupní index pomocí 3 vstupní index. V new výstup index musím naplnit několik konkrétních oblastí z vstupního index. Snažím se vytvořit nové pole pomocí add_field.je to napevno, jako '%{[index1name][field1inIndex1]}' místo vyplnění hodnoty z indexu. Zkoušel jsem níže uvedený 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
}
}