Max_Wang
(Max Wang)
September 22, 2021, 11:28am
1
I have a logstash conf
field A : Value A
field B : Value B
———————————————————————————
I would like to become
The value of field A is equal to N/A, i will use the value of field B, as follows:
field A : N/A -> field A : Value B
Can someone provide an approach?
Does this look like what you need?
Test Conf
input { generator { lines => ['[{"fielda": "N/A", "fieldb": "valueb"},{"fielda": "valuea", "fieldb": "valueb"}]'] count => 1 codec => "json" } }
filter {
if [fielda] == "N/A" {
mutate {
update => { "fielda" => "%{fieldb}" }
}
}
}
output { stdout { codec => json } }
1 Like
system
(system)
Closed
October 20, 2021, 12:06pm
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.