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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

What are Community Office Hours?Community Office Hours is an interactive 60-minute Zoom series where ...

It’s go time — Boston, here we come!

Are you ready to take your Splunk skills to the next level? Get set, because Splunk University is back, and ...

Performance Tuning the Platform, SPL2 Templates, and More New Articles on Splunk ...

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