Hi all,
I am new to Google Security Operations and am trying to create a custom parser but facing issues in two cases. Can anyone help me with this?
1. Problem:
I am attempting to parse the following data to UDM, but I am unable to loop through this data and print it, as it does not have a parent object.
sample input
[
{
"info": "STRING"
},
{
"info": "STRING"
}
]
2. Problem:
I have data that contains coordinates, and I am trying to map it to the region_coordinates field, which has a map type structure.
Sample input:
"location": { "coordinates": [ -84.6350721252, 33.8159259083, 0.0 ], "type": "Point" },
Code I tried:
The following code is not producing any response, and when I try with some other code, it throws an error for mapping:
for index, phoneNumber in location.coordinates {
mutate {
convert => {
"index" => "string"
"phoneNumber" => "string"
}
}
mutate {
replace => {
"phoneNumber_label" => ""
}
}
mutate {
replace => {
"phoneNumber_label.value" => "%{phoneNumber}"
}
on_error => "phoneNumber_invalid"
}
if ![phoneNumber_invalid] {
mutate {
merge => {
"event.idm.read_only_udm.principal.location.region_coordinates" => "phoneNumber_label"
}
on_error => "phoneNumber_label_merge_failed"
}
}
statedump {}
}
Any guidance or help would be greatly appreciated.
@cmmartin_google can you help in this problem .