Splunk Enterprise

How to pass earliest and latest based on Week Number under drilldown section

sangs8788
Communicator

Hi 

I have input fields which has value as week number. Based on the Weeknum selected, how do I pass on the earliest and latest date under my drilldown.

Here is my input field

 

<input type="dropdown" token="weeknum" searchWhenChanged="true">

 

And here is my drilldown section from one of the dashboard panel where time range gets passed to another page (sre_module_summary) in the name of token selectedearliest & selectedlatest. How to get the values for the token based on the weeknum selected from input panel.

 

<drilldown target="_blank">
<eval token="Module">$click.value$</eval>
<eval token="HostType">$HostType$</eval>
<link>
<![CDATA[/app/sre/sre_module_summary?form.Module=$Module$&host=$HostType$&form.timerange.earliest=$selectedearliest$&form.timerange.latest=$selectedlatest$]]>
</link>
</drilldown>

 

Could someone please help.

Labels (1)
0 Karma

FritzWittwer1
Path Finder

You should able to calculate earliest and latest with by setting a token with eval, see Define token filtering and formatting  in the Token usage in dashboards 

this would need something like:

<eval token="tk_earliest">strptime("t00:00 w$your_token_with_week_number$ wd1 y"+strftime(now(),"%Y"), "t%H:%M w%U wd%w y%Y")</eval>

 

0 Karma
Get Updates on the Splunk Community!

Dashboard Studio Challenge - Learn New Tricks, Showcase Your Skills, and Win Prizes!

Reimagine what you can do with your dashboards. Dashboard Studio is Splunk’s newest dashboard builder to ...

Introducing Edge Processor: Next Gen Data Transformation

We get it - not only can it take a lot of time, money and resources to get data into Splunk, but it also takes ...

Take the 2021 Splunk Career Survey for $50 in Amazon Cash

Help us learn about how Splunk has impacted your career by taking the 2021 Splunk Career Survey. Last year’s ...