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!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...

[Puzzles] Solve, Learn, Repeat: Dereferencing XML to Fixed-length events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

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

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