I am currently working with data from SendGrid Event API that is being ingested into Splunk. The data includes multiple email events (e.g., delivered, processed) wrapped into a single event, and this wrapping seems to happen randomly. Here is a sample of the data structure: [
{
"email": "
[email protected]",
"event": "delivered",
"ip": "XXX.XXX.XXX.XX",
"response": "250 mail saved",
"sg_event_id": "XXXX",
"sg_message_id": "XXXX",
"sg_template_id": "XXXX",
"sg_template_name": "en",
"smtp-id": "XXXX",
"timestamp": "XXXX",
"tls": 1,
"twilio:verify": "XXXX"
},
{
"email": "
[email protected]",
"event": "processed",
"send_at": 0,
"sg_event_id": "XXXX",
"sg_message_id": "XXXX",
"sg_template_id": "XXXX",
"sg_template_name": "en",
"smtp-id": "XXXX",
"timestamp": "XXXX",
"twilio:verify": "XXXX"
}
] I am looking for a query that can help me extract the email, event, and response (reason) fields from this data, even when multiple events are wrapped into a single event entry. Could anyone please provide guidance on the appropriate Splunk query to achieve this?
... View more