Splunk Search

find change in url category.

abhijeets
Explorer

Hello Experts, 

looking for query where i can find  list of urls  blocked today which were allowed yesterday under different category. 

fields-

url, url-category, action (values-allowed, blocked) and time (to compare between yesterday and today)

 

Thank you advance. 

 

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

See if this gets you started.

<<your search for events>>
```Determine if the event is from today or yesterday ```
| eval day=if((now() - _time) >= (now() - relative_time(now(), "@d")),"today", "yesterday")
```Keep the most recent event today and yesterday for each URL
| dedup url, day
```List the actions for each URL```
| stats list(action) as actions, values(*) as * by url
```Keep the events with different actions
| where mvcount(actions) = 2
```Keep the events where the first action is 'allowed' and the second is 'blocked'```
| where (mvindex(actions,0)="allowed" AND mvindex(actions,1)="blocked")
---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...

Index This | How many sevens are there between 1 and 100?

August 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...