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.