Splunk Search

SPL Query to filter the ip used less than 20+users

SabariRajanT
Path Finder

Hi Team,

I have a dashboard where existing results showing Event date, Event title, email id, Logon IP, Logon Location, AD Location.

The condition here is I need to remove the Logon IP used by more than 20+users from my current dashboard and display only Logon IP used by less than 20+ users

 

EG:     index=ert  "192.34.23.122" earliest=-30d | stats dc(user) as "Distinct users"

Using above query if the logon ip 192.34.23.122 used by more than 20+ users then my dashboard doesn't show up.

EG:     index=ert  "192.34.23.122" earliest=-30d | stats dc(user) as "Distinct users"

Using above query if the logon ip 192.34.23.122 used by less than 20+ users then my dashboard should show up.

Please suggest suitable SPL query for this.

Labels (1)
Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
index=ert  "192.34.23.122" earliest=-30d | stats dc(user) as "Distinct users" | where 'Distinct users' < 20
0 Karma

SabariRajanT
Path Finder
index=ert  "192.34.23.122" earliest=-30d | stats dc(user) as "Distinct users" | where 'Distinct users' < 20

 

In some condition ip address is not specifically determined, like below

index=ert "IPaddress" like this - how do we return the results now?

Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
index=ert  earliest=-30d | stats dc(user) as "Distinct users" by IPAddress | where 'Distinct users' < 20
0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...