Splunk Search

How to filter my search to only list values for a field that contain more than one host?

varma365
New Member

Here is a simple question. The following is my search:

index="atg" sessionId="*mob" host="*" | stats values(host) as hosts,values(source) as sources by sessionId 

Now I want to list out the sessionId values which contain more than one host or one source. How can I filter the results?

0 Karma

yuanliu
SplunkTrust
SplunkTrust

Add a dc(host) to the search, then filter off that key.

 index="atg" sessionId="*mob" host="*"
 | stats values(host) as hosts, dc(host) as hostcount, values(source) as sources by sessionId 
 | where hostcount > 1
0 Karma

shivarpith
Path Finder

how do we write this query in case on SPlunk Enterprise Security

0 Karma
Get Updates on the Splunk Community!

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...