Replace value with another value

Hi,

Below is my code to replace one value with another value, i have True and false value in field Order completed ? ,
and i want to replace true with Total order shipped and false with total order Pending.

But when you create a visualization in kibana it gives the value of "Order complete?" as well, i dont, want that to be visible in visualization.

mutate {convert => ["Order Complete?", "boolean"]}
if [Order Complete?] =~ "True" {
mutate {
replace => { "Order Complete?" => "Total Order Shipped" }
}
}

if [Order Complete?] =~ "False" {
mutate {
replace => { "Order Complete?" => "Total Order Pending" }
}
}

Can you help me?

I would be surprised if those conditionals work. If [Order Complete?] is a boolean why not do

if [Order Complete?] {
    mutate { replace => { "Order Complete?" => "Total Order Shipped" } }
} else {
    mutate { replace => { "Order Complete?" => "Total Order Pending" } }
}

Thats works, Thanks a lot.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.