Splunk Search

How to search a query based on the result of another query?

krishman23
Explorer

I have list of events that have IP address

{
USERID: system01
browser: Chrome,
ip: 192.168.10.10
...}
{
USERID: system03
browser: Chrome,
ip: 192.168.10.10
...}
{
USERID: system02
browser: Chrome,
ip: 192.168.11.10
...}
I want to get the events that has the number of ip only once
the output should only be
{
USERID: system01
browser: Chrome,
ip: 192.168.11.10
...}
as 192.168.10.10 is repeated twice it should be eliminated.

Tags (2)
0 Karma
1 Solution

pradeepkumarg
Influencer

If you have IP address extracted into a field, let's say IP. You can append following to your search.


|eventstats count by IP | search count < 2

View solution in original post

0 Karma

pradeepkumarg
Influencer

If you have IP address extracted into a field, let's say IP. You can append following to your search.


|eventstats count by IP | search count < 2

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...