Getting Data In

Create new Key-Value-Pair out of a Value

Dreads94
Explorer

Hey together,

I've got a problem with extracting multiple key-value-pairs.
At the moment my input looks like this:

PrcTpMem=firefox.exe=1611500, eclipse.exe=1393504, javaw.exe=1180432.

When I extract the fields, it looks like PrcTpMem ist the Key for "firefox.exe=1611500".
The following pair is eclipse.exe=1393504 caused by the comma.
Actually the last way is the way it should look like.
But I've got no idea how to split the first part or how to cut the first part by leaving out "the PrcTpMem=".

In addition I have to manage it by editing the transforms.conf.

The Transforms.conf for this part looks like this at the moment :

[System_Healthy]

DELIMS = ";", ",="

It would be great if someone of you had an idea. Thanks!

0 Karma
1 Solution

jtrucks
Splunk Employee
Splunk Employee

Setting up an extract like:

PrcTpMem=firefox.exe=(?<firefox>\d+),\seclipse.exe=(?<eclipse>\d+),\sjavaw.exe=(?<java>\d+)

will pull these out.

However, if the items after PrcTpMem= can be dynamic or numerous, and if the PrcTpMem= string itself is useless to you, look at props.conf section for SEDCMD- to remove that string entirely, which would basically solve your problem immediately upon indexing the new data.

--
Jesse Trucks
Minister of Magic

View solution in original post

jtrucks
Splunk Employee
Splunk Employee

Setting up an extract like:

PrcTpMem=firefox.exe=(?<firefox>\d+),\seclipse.exe=(?<eclipse>\d+),\sjavaw.exe=(?<java>\d+)

will pull these out.

However, if the items after PrcTpMem= can be dynamic or numerous, and if the PrcTpMem= string itself is useless to you, look at props.conf section for SEDCMD- to remove that string entirely, which would basically solve your problem immediately upon indexing the new data.

--
Jesse Trucks
Minister of Magic

Dreads94
Explorer

Thanks a lot! It worked great.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...