this's my logstash output:
"prometheus" => {
"metrics" => {
"container_cpu_load_average_10s" => 0,
"container_cpu_user_seconds_total" => 18.15,
"container_cpu_system_seconds_total" => 12.64
}
},
now I want use one statement like this:
mutate {
rename => {
"[prometheus][metrics][.*]" => "[.*]"
}
}
to implement like this:
mutate {
rename => {
"[prometheus][metrics][container_cpu_load_average_10s]" => "[container_cpu_load_average_10s]"
"[prometheus][metrics][container_cpu_user_seconds_total]" => "[container_cpu_user_seconds_total]"
"[prometheus][metrics][container_cpu_system_seconds_total]" => "[container_cpu_system_seconds_total]"
}
}
Can you help me?Pls!