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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...