Dashboards & Visualizations

Unable to visualize the dashboard as per the requirement

shenoyveer
Path Finder

Hi Everyone,

 

I am trying to create one dashboard out of search query but I am getting stuck where I am unable to the host details in the dashboard.

 

query is - 

index="vm-details" | eval date=strftime(_time, "%Y-%m-%d")
| stats dc(host) as host_count, values(host) as hosts by date | sort date

I am getting host_count and date in dashboard but my requirement is I need hostname should come while hovering host_count

I tried using values(host) directly but that didnt work.

can someone help?

CC: @ITWhisperer 

Thanks,
Veeresh Shenoy S

Labels (1)
0 Karma
1 Solution

kiran_panchavat
Builder

@shenoyveer You can use trellis, split by host. 

kiran_panchavat_0-1736271955439.png

kiran_panchavat_1-1736272033939.png

I hope this helps, if any reply helps you, you could add your upvote/karma points to that reply, thanks.

 

I hope this helps, if any reply helps you, you could add your upvote/karma points to that reply, thanks.

View solution in original post

kiran_panchavat
Builder

@shenoyveer You can use trellis, split by host. 

kiran_panchavat_0-1736271955439.png

kiran_panchavat_1-1736272033939.png

I hope this helps, if any reply helps you, you could add your upvote/karma points to that reply, thanks.

 

I hope this helps, if any reply helps you, you could add your upvote/karma points to that reply, thanks.

shenoyveer
Path Finder

Thanks Kiran 🙂

0 Karma

kiran_panchavat
Builder

@shenoyveer 

If you take out the eval from the query, you must also remove the date field from it.

index="vm-details"
| timechart count by host

I hope this helps, if any reply helps you, you could add your upvote/karma points to that reply, thanks.

shenoyveer
Path Finder

is there any alternative to timechart?

 

I want to have particular date in x axis

0 Karma

kiran_panchavat
Builder

@shenoyveer 

Can you check this? 

The x-axis will be the first column/field in the results, so put the date as the first field after the by.

kiran_panchavat_2-1736271715537.png

 

 

 

 

I hope this helps, if any reply helps you, you could add your upvote/karma points to that reply, thanks.
0 Karma

shenoyveer
Path Finder

Tried with another query too

index="testing" | eval date=strftime(_time, "%Y-%m-%d") | stats count by date, host

but still its not showing hostname in dashboard

shenoyveer_0-1736269702861.png

 

 

0 Karma

kiran_panchavat
Builder

@shenoyveer   Try this and see if it meets your requirements. You can remove | eval date=strftime(_time, "%Y-%m-%d")

kiran_panchavat_1-1736250933588.png

 

I hope this helps, if any reply helps you, you could add your upvote/karma points to that reply, thanks.
0 Karma

isoutamo
SplunkTrust
SplunkTrust

Please write all SPL etc. inside </> tags. That way those are easier to take into use. It also ensure that we can get the same SPL what you have write into your example.

0 Karma

shenoyveer
Path Finder

Hi Kiran,

 

Thanks for the prompt reply. Its not working for me and after removing eval no data popping up.

 my goad is to get the hostname while hovering the host_count variable from query

0 Karma
Get Updates on the Splunk Community!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...