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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...