Splunk Search

Filter Multiple Event Results Into A Single Value

dunsha
New Member

I would like to return the value of a string only once even if it shows up multiple times in splunk. For example:

"rscprod" "rscapirequestresponse" "caseId"// : //"2209102486"

The search above returns multiple 200+ events, I would like my search to research count = 1 for <"caseId"// : //"2209102486">

Tags (1)
0 Karma

kmorris_splunk
Splunk Employee
Splunk Employee

You could use dedup on the caseId field, provided it is being extracted:

[YOUR BASE SEARCH]
| dedup caseId
0 Karma

adonio
Ultra Champion

hope i understand you correctly,
try: your search for string here | head 1

0 Karma

lukas_loder
Communicator

Or do you want to count for each caseId?
so you get a list like:
caseId1 count=2
caseId2 count=1
caseId3 count=5

| stats count by caseId
0 Karma
Get Updates on the Splunk Community!

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...

Cloud Platform & Enterprise: Classic Dashboard Export Feature Deprecation

As of Splunk Cloud Platform 9.3.2408 and Splunk Enterprise 9.4, classic dashboard export features are now ...