Splunk Search

Matching Hostname to IP Between Two Lookups?

atebysandwich
Path Finder

I have two lookups. One lookup has Hostnames and IPs and the other has hostnames. I would like to run a search so I can take second lookup and see if its hostname is in the first, and if it is, show the hostname and the IP in the search results. 

Labels (3)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

If I understand the matter right, this should get you started.

| inputlookup lookup2
| lookup lookup1 hostname
| where isnotnull(ip)
| table hostname ip
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

If I understand the matter right, this should get you started.

| inputlookup lookup2
| lookup lookup1 hostname
| where isnotnull(ip)
| table hostname ip
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...