Dashboards & Visualizations

Splunk dashboard do mathematical operation for set token value

raghu_vedic
Path Finder

Hi,

I want to set token value for setTailValue
if $job.resultCount$ is 3 then value have to set 20-17=3, but its displaying 20-17 as it taking string.

          <set token="setTailValue">20-$job.resultCount$</set>
Tags (1)
0 Karma
1 Solution

rjthibod
Champion

If you are using Splunk 6.3 or newer, you can use eval

<eval token="setTailValue">20-$job.resultCount$</eval>

View solution in original post

0 Karma

rjthibod
Champion

If you are using Splunk 6.3 or newer, you can use eval

<eval token="setTailValue">20-$job.resultCount$</eval>

0 Karma

Umesh_Vedicsoft
Path Finder

Hi raghu_vedic,

Here you can use <eval token="setTailValue">20-$job.resultCount$</eval> instead of <set token="setTailValue">20-$job.resultCount$</set>

Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...