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
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...