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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...