Splunk Search

How to get the search report of a value?

runiyal
Path Finder

In the log there are events like -

{"submitterType":"Others","SubID":"App_4-45887-02232023"}

{"submitterType":"Others","SubID":"App_5-45892-02232023"}

 

I want a report showing -

App_4-45887-02232023

App_5-45892-02232023

 

Thanks!

Labels (1)
Tags (2)
0 Karma

yuanliu
SplunkTrust
SplunkTrust

You didn't explain why Splunk does not give you SubID automatically.  The illustrated logs are conformant JSON.  If they are the raw events, there should be no reason that you don't have both fields submitterType and SubID.

If the illustrated log is one of fields that Splunk extracts for you, say "log", spath is the command to extract JSON nodes.

 

| spath input=log

 

Your sample data will give

SubIDsubmitterType
App_4-45887-02232023Others
App_5-45892-02232023Others
Tags (1)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

You don't say much about what you need other than the results of that field, so in its basic form, you need to extract that SubID field if it's not already extracted and then do

your_search...
| table SubID

 If your data is JSON then SubID should be extracted

If you want to count the occurrrences of each SubID, then do

your_search...
| stats count by SubID
0 Karma

runiyal
Path Finder

Just trying to extract the field.

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...