Hi,
I have a json input as per below;
"stats": {
"src": {
"port": {
"6666": 1
},
"rep": 1,
"country": {
"US": 1
},
"ip": {
"1.1.1.1": {
"rep": 1,
"uuid": "NULL",
"country": "US",
"count": 1
}
}
},
"dst": {
"port": {
"443": 1
},
"rep": 0,
"country": {
"US": 1
},
"ip": {
"2.2.2.2": {
"rep": 0,
"uuid": "0x29bfa15ae6da11e7a1ac000cfb542710",
"country": "US",
"count": 1
}
}
},
"events": 1
},
I'd like to do a geoip of the [src][ip] however, the value of [src][ip] is in fact, "1.1.1.1": { "rep": 1, "uuid": "NULL", "country": "US", "count": 1 }.
I tried to copy [src][ip] to a new field called src_ip but, it copies the whole thing. Is there any way to remove the other fields under src_ip?
I've already tried,
mutate {
remove_field => [ "[src_ip][rep]", "[src_ip][uuid]", "[src_ip][count]", "[src_ip][country]" ]
}
but it didn't work.