Mutate Add_field


(Koushik Vigneswara) #1

I'm new to Logstash and I would be thankful if you could help me out. Is it possible to create an array using add_field of mutate. Below is my config file,

input {
file {
path => "/opt/logAnalyzer/source/log_/.txt"
start_position => "beginning"
}
}
filter {
json {
source => "message"
target => "msg"
}
mutate {
add_field => {
"Relation" => {
"IP-Address" => "%{[msg][message][IP-Address]}",
"Name" => "HostName"

		}
}

}
output {
stdout {
codec => rubydebug
}
file {
path => "/root/abc/def/ghi.txt"
}
}

add_field is giving me an error. Thanks in advance.


(Mark Walkom) #2

Please don't post the same question more than once - Add_tag


(Mark Walkom) #3