Splunk Search

Can you force the transaction command to keep duplicate entries in a multivalue field output?

jaredswarren200
Engager

I have a search using the transaction command that returns the following (as a single transaction, not as separate events)...let's call this search "searchA":

2014-04-16 22:40:22,257 MDCID=D325388-5011926287919291836 PerformanceUnitName=eMemberSearch PerformanceUnitDuration=168 
2014-04-16 22:40:22,427 MDCID=D325388-5011926287919291836 PerformanceUnitName=eAddTransaction PerformanceUnitDuration=166 
2014-04-16 22:40:22,541 MDCID=D325388-5011926287919291836 PerformanceUnitName=eAddTransaction PerformanceUnitDuration=111 
2014-04-16 22:40:22,694 MDCID=D325388-5011926287919291836 PerformanceUnitName=eUpdateCertificate PerformanceUnitDuration=129 
2014-04-16 22:40:22,755 MDCID=D325388-5011926287919291836 PerformanceUnitName=eUpdateCertificate PerformanceUnitDuration=58 
2014-04-16 22:40:22,829 MDCID=D325388-5011926287919291836 PerformanceUnitName=eUpdateCertificate PerformanceUnitDuration=44 
2014-04-16 22:40:22,874 MDCID=D325388-5011926287919291836 PerformanceUnitName=eUpdateCertificate PerformanceUnitDuration=43 
2014-04-16 22:40:22,919 MDCID=D325388-5011926287919291836 PerformanceUnitName=eUpdateCertificate PerformanceUnitDuration=42 
2014-04-16 22:40:22,997 MDCID=D325388-5011926287919291836 PerformanceUnitName=eUpdateCertificate PerformanceUnitDuration=76 
2014-04-16 22:40:23,041 MDCID=D325388-5011926287919291836 PerformanceUnitName=eUpdateCertificate PerformanceUnitDuration=42 
2014-04-16 22:40:23,086 MDCID=D325388-5011926287919291836 PerformanceUnitName=eUpdateCertificate PerformanceUnitDuration=42 
2014-04-16 22:40:23,258 MDCID=D325388-5011926287919291836 PerformanceUnitName=eUpdateCertificate PerformanceUnitDuration=169 

When I do searchA | table PerformanceUnitName, I get the following multivalue field:

eMemberSearch
eAddTransaction
eUpdateCertificate

This is unfortunate, because I actually wanted to count the number of each distinct PerformanceUnitNames in the output.

Is there any way to get the transaction command to preserve the duplicates?

1 Solution

martin_mueller
SplunkTrust
SplunkTrust

jaredswarren200
Engager

Yes! It is, in fact.

Use the "mvlist=t" argument to the transaction command.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You're looking for mvlist=PerformanceUnitNames, see http://docs.splunk.com/Documentation/Splunk/6.0.3/SearchReference/Transaction for reference.

moisesroth
Path Finder

The full search command answer for me was:

index="my_app" p_id=* | transaction p_id mvlist=status
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...