Splunk Search

Sub Search counts

SUNRAJ
Engager

I have filed called serial_id which have value ABC2022100845001 

I need count with contain 45  in last 5 & 6 th bytes 

Labels (1)
0 Karma
1 Solution

somesoni2
Revered Legend

Try this:

Your base search | regex serial_id=".+45...$" | stats count

View solution in original post

0 Karma

somesoni2
Revered Legend

Try this:

Your base search | regex serial_id=".+45...$" | stats count
0 Karma

SUNRAJ
Engager

yes it works-  if i need another value like 45 and 47 in sub search and counts in table with distinct counts ?

Tags (1)
0 Karma

SUNRAJ
Engager

yes it works-  if i need another value in sub search and counts in table with distinct counts ??

Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
base search 
| rex field=serial_id ".+(?<marker>..)...$" 
| stats count by marker
0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...