All Apps and Add-ons

Multivalue Field Extraction issue.

jorvinmartinez
New Member

I've been working on a complicated set of log files that collect performance stats for a number of counters. It requires regex work to be done.

The format for the logs files is :

[Source_Identifier]servername[TYPE]-instanceofcounter#counter#start_time_of_collection#end_time_of_collection#numSamples-__#MULIPLE_VALUES_SEPARATED_BY_Comma

Below is a sample :

[virtualserver]Server1.domain.com[HostSystem]-vmnic0#net.transmitted.average#2013-12-31T13:43:00EST#2013-12-31T13:57:40EST#numSamples-45#14,8,26,26,20,14,2,8,2,16,9,3,54,9,14,2,8,2,26,9,14,25,8,14,4,9,26,27,20,15,24,8,2,13,2,21,14,8,3,4,20,3,42,8,15

I created the following field extractions :

perfmon : EXTRACT-perfmon_counter Inline (?i)^[^#]#(?P[^#]+)
perfmon : EXTRACT-perfmon_date_start Inline (?i)..
?#(?P\d+-\d+-\d+\w+:\d+:\d+\w+)(?=#)

perfmon : EXTRACT-perfmon_device Inline (?i)[*]-(?P[^#]+)
perfmon : EXTRACT-perfmon_entity Inline (?i)[virtualserver](?P[^[]+)

perfmon : EXTRACT-perfmon_value Inline (?i)\d+\,(?[^,]+)

The problem I'm having is that the perfmon_value field should be a multivalue field. Only the first value is displayed when I run the following search :

index=perfmon_manager sourcetype=perfmon perfmon_counter="net.transmitted.average" perfmon_entity="Server1.domain.com" | mvexpand perfmon_value | table _time perfmon_entity,perfmon_counter, perfmon_device, perfmon_value

_time perfmon_entity perfmon_counter perfmon_device perfmon_value

1 1/2/14 11:47:20.000 PM Server1.domain.com net.transmitted.average vmnic0 14

I would like to get a table each value as a separate event similar to :

_time perfmon_entity perfmon_counter perfmon_device perfmon_value

1 1/2/14 11:47:20.000 PM Server1.domain.com net.transmitted.average vmnic0 14
1 1/2/14 11:47:20.000 PM Server1.domain.com net.transmitted.average vmnic0 8
1 1/2/14 11:47:20.000 PM Server1.domain.com net.transmitted.average vmnic0 26
1 1/2/14 11:47:20.000 PM Server1.domain.com net.transmitted.average vmnic0 26
1 1/2/14 11:47:20.000 PM Server1.domain.com net.transmitted.average vmnic0 20
1 1/2/14 11:47:20.000 PM Server1.domain.com net.transmitted.average vmnic0 14
1 1/2/14 11:47:20.000 PM Server1.domain.com net.transmitted.average vmnic0 2
1 1/2/14 11:47:20.000 PM Server1.domain.com net.transmitted.average vmnic0 8
1 1/2/14 11:47:20.000 PM Server1.domain.com net.transmitted.average vmnic0 2

THanks for your assistance.

0 Karma
1 Solution

Ledion_Bitincka
Splunk Employee
Splunk Employee

This is similar to this question . You can do what you need by using REPORT in props.conf and transforms.conf to define the extraction rule, e.g.

props.conf
[sourcetype]
...
REPORT-xyz = perfmon-vals

transforms.conf
[perfmon-vals]
REGEX = ,(\d+)
MV_ADD = true

View solution in original post

Ledion_Bitincka
Splunk Employee
Splunk Employee

This is similar to this question . You can do what you need by using REPORT in props.conf and transforms.conf to define the extraction rule, e.g.

props.conf
[sourcetype]
...
REPORT-xyz = perfmon-vals

transforms.conf
[perfmon-vals]
REGEX = ,(\d+)
MV_ADD = true
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!

Meet the .conf26 AI Agent Buildathon Winners

At the .conf26 AI Agent Buildathon, Splunk users turned their operational expertise into working AI agents ...

Trusted Autonomy in the SOC: A Maturity Journey

AI is compressing attacker timelines and pushing SOC teams beyond human capacity thresholds. The next SOC ...

Supercharging Windows Security Detection Performance: Introducing Hybrid Field ...

Windows event logs—from Security auditing and Sysmon to PowerShell script blocks—form the operational backbone ...