Splunk Search

How to use lookup dnslookup to get list of hostnames from a CSV file?

Kitag345
Explorer

Hello,

I am trying to obtain IPs from Hostnames. I am using inputlookup to get the list of hostnames from a CSV file. The problem is that "lookup dnslookup" is only displaying IPs for certain hosts (there are no missing fields). My queries are correct as the Table command provides all the information I need. Except, I obtain a lot of nulls instead of IPs. What I am doing wrong?

xxxxx

xxxxxxx

| lookup dnslookup clienthost as Hostname OUTPUT clientip as ComputerIP

| table Hostname ComputerIP

Labels (1)
0 Karma

nyc_jason
Splunk Employee
Splunk Employee

Could some of those IPs internal IPs (like a 192.168.x.x network), or otherwise not resolvable? For the IPs that dont resolve, spot check some from a command prompt using nslookup <ip>

0 Karma

Kitag345
Explorer

Most, if not all of those IPs are on the 10.x.x.x they are all resolvable.

0 Karma
Get Updates on the Splunk Community!

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...