Dashboards & Visualizations

Perform calculation in set tag in dynamic drilldown

Motoko89
Path Finder

Hi all, when a user clicks on a column in a chart, I want to pass custom values computed based on existing values and tokens into the link. I tried:

<drilldown>
   <set token="time_start">
       strftime($earliest|s$, "%Y-%m-%d")
    </set>
    <link>
       <![CDATA[ /app/search/report__overview#en-US/app/search/report__overview?form.input1=$time_start$&earliest=0&latest=
       ]]>
    </link>
</drilldown>

However, $time_start$ is resolved to strftime(%221457938800%22%2C%20%22%25Y-%25m-%25d%22) in the URL. How do I make Splunk perform the calculation instead?

0 Karma

jeffland
SplunkTrust
SplunkTrust

You need to use eval instead of set:

<drilldown>
  <eval token="time_start">strftime($earliest|s$, "%Y-%m-%d")</eval>
  <link>...

See here for docs.

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...