Splunk Search

Using stats to organise repetitive data

leonheart78
Explorer

I have a set of data as below:
alt text

If you can see, the TagNames are repetitive. I would want to re-arrange it to below format

TagName LimitString1 LimitString2 LimitString3 .. . . . . . . . . .

CHEM_R13719 null 18
CHEM_R13720 null 01
.
.
CHEM_R13723 0 4940

May I know how can I use stats command to achieve this? Thank you

Tags (2)
0 Karma

utk123
Path Finder

It seems you are looking for something like this:
index=.... | stats list(LimitString) as "Limit String" by TagName

0 Karma

DalJeanis
Legend

Try...

 Your search
| eval LimitString=coalesce(LimitString,"")
| stats count by TagName LimitString
0 Karma

leonheart78
Explorer

Unfortunately, the output is not what I required. Basically, we need to sort the values in LimitString, into the respective TagName. I was reading up on the "bin" command, not sure it would help in getting what I wanted.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...