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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...