Splunk Search

Using stats dc with stats list and count

jwalzerpitt
Influencer

I have the following search looking for external hosts that are trying to brute force multiple WordPress or Drupal sites:

index=foo sourcetype="f5:bigip:asm:syslog" action!=blocked uri="/*login.php" OR uri="/*admin/" OR  uri="*user\/login" uri!="*revslider*" action!=blocked 
| stats count by src uri
| sort -count
| stats list(uri) as URI, list(count) as count, sum(count) as Total by src 
| sort -Total
| head 10

Output is as follows:

alt text

How can I utilize stats dc to return only those results that have >5 URIs?

Thx

0 Karma
1 Solution

vnravikumar
Champion

Hi @jwalzerpitt

Please try

| stats dc(uri) as distinct_uri, values(uri) as URI, values(count) as count, sum(count) as Total by src | where distinct_uri > 5

View solution in original post

vnravikumar
Champion

Hi @jwalzerpitt

Please try

| stats dc(uri) as distinct_uri, values(uri) as URI, values(count) as count, sum(count) as Total by src | where distinct_uri > 5

jwalzerpitt
Influencer

Thx as that worked perfectly!

0 Karma

vnravikumar
Champion

welcome 🙂

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...