Splunk Search

Need a help in creating a dashboard to get information on the IP address?

Hemnaath
Motivator

Hi, I got a request to create a dashboard to get the information on the ipaddress, with multiple panels and one input text tokens, another with Time Picker. One of the Dashboard panel output should contain Hostname (resolved by dns lookup).
I was referring the below link to understand

https://answers.splunk.com/answers/105246/dns-resolution-in-a-search.html

But unable understand the query referred in the link. I mean What search string should be placed before the pipe symbol?

| lookup dnslookup clientip as dst OUTPUT clienthost as DST_RESOLVED

Could anyone guide me on the query which can fetch the Hostname (resolved by dns lookup).

Tags (2)
0 Karma

solarboyz1
Builder

The query required depends on your data, and the field that contains the information you require.

In the example:

| lookup dnslookup clientip as dst OUTPUT clienthost as DST_RESOLVED

The even generating search, is returning a dst field, which is being resolved the resolved value is being stored in the field DST_RESOLVED

0 Karma

Hemnaath
Motivator

Thanks for your response, hey I had tried the below query to fetch the resolved IP address as the Hostname

Query details:

dest="10.x.x.*" | stats count by dest |  lookup dnslookup clientip as dest OUTPUT clienthost as Hostname | dedup dest Hostname | table dest Hostname

I am getting the resolved IP address with the corresponding Hostname.

dest            Hostname
10.x.x.x    vmw1dev8.xxxxx.com

But when same was query is applied to the dashboard panels it is not working. In dashboard we have two input fields one input text tokens (Ip address) and another with Time Picker.

Token for input text field is defined as "$D$"
Token for Time Picker drop down is defined as "$T$"
Search on change option is checked and for time picket shared time picker option is selected.

Query in the dashboard panels.

dest="$D$" | stats count by dest |  lookup dnslookup clientip as dest OUTPUT clienthost as Hostname | dedup dest Hostname | table dest Hostname

And In dashboard I could see this

search is waiting for input ....

Can you please guide on this to fix this issue.

0 Karma

Hemnaath
Motivator

hey when tried to edit and execute the query in open search, I am getting a "undefined" in the search. So can any guide me on this to fix this.

0 Karma
Get Updates on the Splunk Community!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...