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
Champion

@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.

 

Did this help? If yes, please consider giving kudos, marking it as the solution, or commenting for clarification — your feedback keeps the community going!

View solution in original post

kiran_panchavat
Champion

@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.

 

Did this help? If yes, please consider giving kudos, marking it as the solution, or commenting for clarification — your feedback keeps the community going!

shenoyveer
Path Finder

Thanks Kiran 🙂

0 Karma

kiran_panchavat
Champion

@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

Did this help? If yes, please consider giving kudos, marking it as the solution, or commenting for clarification — your feedback keeps the community going!

shenoyveer
Path Finder

is there any alternative to timechart?

 

I want to have particular date in x axis

0 Karma

kiran_panchavat
Champion

@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

 

 

 

 

Did this help? If yes, please consider giving kudos, marking it as the solution, or commenting for clarification — your feedback keeps the community going!
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
Champion

@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

 

Did this help? If yes, please consider giving kudos, marking it as the solution, or commenting for clarification — your feedback keeps the community going!
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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...