Getting Data In

DNS Resolution Revisited

balcv
Contributor

I previously asked for some help on setting up dns resolution when performing searches and I got some great info and was able to get it all working. BUT, after a recent change in my Splunk install (the version I was using expired), the dns resolution will not work.

I have the required lines on my transforms.conf:
[dnsLookup]
external_cmd = external_lookup.py host ip
fields_list = host, ip

Then in my search I have (where dst is the ip address I want resolved):
source="udp:64514" SSH_Connects | lookup dnsLookup dst

Rather than get the data I require with the dst resolved I get this error:
Error in 'lookup' command: Could not find all of the specified lookup fields in the lookup table.

Can anyone enlighten me on what I'm doing wrong.

Tags (2)
0 Karma

usethedata
Path Finder

My guess is that your script is not outputting the fields that are expected. Don't you need to do lookup dnsLookup ip as dst to get the ip address passed in with the right name?

balcv
Contributor

Thank you. That was what I needed. Search that now works is and gives resolved name, ip and count:
source="udp:64514" SSH_Connects | stats count by dst | lookup dnsLookup ip as dst | sort -count | table host dst count

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Data Management Digest – May 2026

Welcome to the May 2026 edition of Data Management Digest!   As your trusted partner in data innovation, the ...

Index This | What is feather-light but cannot be held long?

May 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

.conf26 Registration is Live: Secure Your Early Bird Pass Now

  Lock in Your Spot: Registration Open for .conf26 in Denver Hello Splunkers, I have exciting news! Your ...