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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...