Dashboards & Visualizations

How to create a panel that shows Unique URI by IP?

SecDesh
Path Finder

Good Afternoon, I am attempting to create a panel that shows me the unique URIs that have been accessed by a specific IP, with counts associated with the URI. I'm trying to get it to where it tells me something like this:

10.20.30.40 accessed www<.>google<.>com 40 times.

Here is my current query:

Index=nsm
| stats list(uri) by src_ip

This displays what I want but with duplicates, and it provides no counts. I tried adding | dedup with it which shows everything only once, but again no count.

Index=nsm
| chart count by src_ip,uri

This provides me the information/details of what I'm looking for, however the display is not ideal, and it doesn't show all URI's since it caps at OTHER.

 

Any information would be greatly appreciated

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
Index=nsm
| stats count by src_ip,uri
| eval accesses="accessed ".uri." ".count." times"
| stats list(accesses) as accesses by src_ip

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
Index=nsm
| stats count by src_ip,uri

or

Index=nsm
| chart useother=f count by src_ip,uri
0 Karma

SecDesh
Path Finder

The first query you provided is close since it provides the counts per URI, however it segregates the IP for every single uri. So instead of lumping all the URIs under 10.20.30.40, I instead see 10.20.30.40 multiple times for each URI.

The second query doesn't provide me all of the URI's. It caps at 10 and doesn't shown anymore. Even though I know that the IP has accessed a specific website.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
Index=nsm
| stats count by src_ip,uri
| eval accesses="accessed ".uri." ".count." times"
| stats list(accesses) as accesses by src_ip

SecDesh
Path Finder

Exactly what I was looking for. Thank you.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @SecDesh,

if you want the list of uri for each src_ip and the total count of connection, you could use something like this:

Index=nsm
| stats values(uri) AS usi count BY src_ip

if you want the value for each uri, you could one of these solutions:

all in rows

Index=nsm
| stats count BY src_ip uri

in a table:

Index=nsm
| chart count OVER uri BY src_ip

Ciao.

Giuseppe

0 Karma

SecDesh
Path Finder

The first query you provided as you stated only shows the total counts of connections. I'm looking  to display the count for every individual URI.

The second query you provided is close since it provides the counts per URI, however it segregates the IP for every single uri. So instead of lumping all the URIs under 10.20.30.40, I instead see 10.20.30.40 multiple times for each URI.

The third query doesn't provide me all of the IP's. It caps at 10 and doesn't shown anymore. Even though I know there are more IPs in my network. Again, extremely close, but it doesn't prevent all of the information I desire.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @SecDesh,

could you explain which output are you waiting for?

Ciao.

Giuseppe

0 Karma

SecDesh
Path Finder

ITWhisperer has provided the exact search query here:

Index=nsm
| stats count by src_ip,uri 
| eval accesses="accessed ".uri." ".count." times"
| stats list(accesses) as accesses by src_ip


I was looking for an output that would display the amount of times an IP accessed a URI. I wanted to group the URIs under one IP instead of having them separated.

The search query I put in this reply will display this output:

10.20.30.40 accessed www<.>youtube<.>com 7 times
                          accessed www<.>google<.>com 8 times
11.21.31.41 accessed www<.>youtube<.>com 10 times

0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...