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!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...