Security

How can I do a search for all URLs that have not had a hit in the last two months.

wbounni11
New Member

Hi;

I want to run a search that reveals all the URL that have not had a hit in the last two months. The feed here are access logs coming from a Symantec Proxy SG device.

The purpose of doing this is removing these URLs from the Proxy policy.

It would be great if I can get the Syntax as I am new to Skype.

Kindly
Wasfi

0 Karma
1 Solution

tscroggins
Influencer

Hi,

You'll need a source of current URLs to compare against past events, e.g. a lookup named url_lookup with a field named url.

With that lookup in hand, you can easily, although slowly, depending on your index configuration, filter the input with a NOT subsearch:

| inputlookup url_lookup where NOT [ index=yourindex sourcetype=yoursourcetype earliest=-2mon| dedup url | table url ]

Replace the index and sourcetype with the correct values or tags or event types for your environment.

(Sorry for the double post. Using mobile.)

View solution in original post

0 Karma

tscroggins
Influencer

Hi,

You'll need a source of current URLs to compare against past events, e.g. a lookup named url_lookup with a field named url.

With that lookup in hand, you can easily, although slowly, depending on your index configuration, filter the input with a NOT subsearch:

| inputlookup url_lookup where NOT [ index=yourindex sourcetype=yoursourcetype earliest=-2mon| dedup url | table url ]

Replace the index and sourcetype with the correct values or tags or event types for your environment.

(Sorry for the double post. Using mobile.)

0 Karma

wbounni11
New Member

Thank you. There is about 80 URLs in that list, would that still work?

Kindly
Wasfi

0 Karma

tscroggins
Influencer

Yes. The limiting factor would most likely be the subsearch, not the lookup. After the subsearch executes, Splunk translates the outer search to:

| inputlookup url_lookup where NOT (url=foo OR url=bar OR url=baz OR url=qux OR ...)

up to the number or live URLs. Internal Splunk limits apply, but the search string itself can be quite long. I don't think the limit is documented, but it's probably related to the maximum request size accepted by splunkweb for manually typed searches and splunkd for derived searches.

0 Karma

Sukisen1981
Champion

care to provide some sample events and expected output :)?

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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