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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...