Getting Data In

How to create custom source type to add metadata fields to each row and parse an array?

maayan
Path Finder

Hi,

following ticket: https://community.splunk.com/t5/Splunk-Search/Join-all-objects-with-specific-object-within-the-same-...

I have a JSON file (key-val structure). I need to create a source type in Splunk enterprise website(I don't have access to the config files). 

Each file include one array called Payloads and metadata header. Payloads includes events. each event has Header+Payload. 
i need to parse the json so each row represent one event and meta data fields will be added to each row.
(metadata fields values are the same for all events in one file).

Example for json:
{
"MetaData": {
"HostName": "host name"
},
"Payloads": [
{
"Header": {
"Type": "Event 1",
"Name": "event name 1",
"TimeStamp": 133299573877857753
},
"Payload": {
"Scan Start Timestamp": 133299573845207001,
"Scan Complete Timestamp": 133299573877857728
}
},
{
"Header": {
"Type": "Event 2",
"Name": "event name 2",
"TimeStamp": 133207765527670215
},
"Payload": {
"MAC Address": "A7",
"Information": {
"APM": "blabla"
},
"CT": "bla",
"LInformation": [
{
"ID": 1
}
],
"CE Parameters": {
"AR Timestamp": 133207765527630372,
"AsR Frame": [ 0, 0, 48, 0, 74, 0 ]
}
}
}
]
}

which definitions should i use in edit source type?

maayan_0-1686818360202.png

maayan_1-1686818376199.png

thanks





Labels (1)
0 Karma
Get Updates on the Splunk Community!

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...