Splunk Search

Is it possible to resolve an IP Address from a URL in the Search & Reporting app?

tonifrommknecht
Engager

How do I get the IP from a URL?

0 Karma
1 Solution

DMohn
Motivator

Yes, you can use a scripted lookup, which will do a reverse DNS check on a given URL.

Please check the example here: http://docs.splunk.com/Documentation/Splunk/5.0.4/Knowledge/Addfieldsfromexternaldatasources#Example...

This is for an older version of Splunk, but the script is still shipped, and can be used as described.

View solution in original post

0 Karma

jkat54
SplunkTrust
SplunkTrust

Use rex command in search, use sedcmd in props. Did you want to make the ip address an indexed field or search time extraction?

  |rex field=urlField "[regex_to_capture_ip]"

  |rex field=urlField "(?<IP>(\d+\.\d+\.\d+\.\d+))"
0 Karma

jkat54
SplunkTrust
SplunkTrust

To use DNS in order to resolve a CNAME like yahoo.com to its A or AAAA records, please use the answer posed by DMohn.

If you have an IP address in a URL field, please use my answer.

0 Karma

DMohn
Motivator

Yes, you can use a scripted lookup, which will do a reverse DNS check on a given URL.

Please check the example here: http://docs.splunk.com/Documentation/Splunk/5.0.4/Knowledge/Addfieldsfromexternaldatasources#Example...

This is for an older version of Splunk, but the script is still shipped, and can be used as described.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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