Splunk Search

How can I group results based on fixed String positions

wandi
Explorer

bla xx bla Call Return: [20001TNSN NONONOONONO]

bla y bla Call Return: [20001TNSN NONONOONONO]

bla zzz bla Call Return: [40401FNSN NONONOONONO]

bla kk bla Call Return: [20001TNSN NONONOONONO]

bla y bla Call Return: [20001FNSN NONONOONONO]

A) first I like to count how many "T" and how many "F" I have. F or T are always the 6th position after "Call Return: [" sequence.

B) Is it possible also group the results for the three first numbers after the "Call Return: [" sequence? eg:

I like as a final result a graph with something like:

"200 F" => 1

"200 T" => 3

"404 F" => 1

0 Karma

wandi
Explorer

wow!! I´m love with Splunk.

Thank you Damien.

0 Karma

Damien_Dallimor
Ultra Champion

We love you too 🙂

0 Karma

Damien_Dallimor
Ultra Champion

Try something like :

... | rex field=_raw "^.+Call\sReturn:\s+\[(?<sequence>\d{3})\d{2}(?<letter_code>[TF])" | stats count by sequence letter_code
Get Updates on the Splunk Community!

Fall Into Learning with New Splunk Education Courses

Every month, Splunk Education releases new courses to help you branch out, strengthen your data science roots, ...

Super Optimize your Splunk Stats Searches: Unlocking the Power of tstats, TERM, and ...

By Martin Hettervik, Senior Consultant and Team Leader at Accelerate at Iver, Splunk MVPThe stats command is ...

How Splunk Observability Cloud Prevented a Major Payment Crisis in Minutes

Your bank's payment processing system is humming along during a busy afternoon, handling millions in hourly ...