Dashboards & Visualizations

Why am I unable to pass eventCount to a panel title using a token?

gcusello
SplunkTrust
SplunkTrust

I did a dashboard panel that shows stats count results with a pie chart.
I'd like to show in the panel title the total number of events (not the result number).
I already used tokens to do this in other dashboards and usually runs well. This is an example:

<title>Status ($Antivirus_count$)</title>
        <search>
          <query>index=XXX ...| stats count by Status</query>
          <progress>
            <set token="Antivirus_count">$job.eventCount$</set>
          </progress>
          <cancelled>
            <unset token="Antivirus_count"></unset>
          </cancelled>
.....

but in this last panel, I have a very long search string with three piped stats count and where clauses; at the end I have a stats count command to show.

I don't understand why in this panel, the result is always 0!
If I try to use as Token job.resultCount instead of job.eventCount, the title correctly shows the number of stats (2).

Anyone knows if there are situations where it's not possible to extract job.eventCount?

Thank you.
Bye.
Giuseppe

1 Solution

gcusello
SplunkTrust
SplunkTrust

It was a bug: using the 6.4.x version of Splunk the problem is solved.
Bye.
Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

It was a bug: using the 6.4.x version of Splunk the problem is solved.
Bye.
Giuseppe

0 Karma

jkat54
SplunkTrust
SplunkTrust

I'm curious if the search is un-setting the token without you knowing.

 What happens if you removed the <cancelled> <unset....</canceled> code?
0 Karma

gcusello
SplunkTrust
SplunkTrust

I tried: same result!

0 Karma
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 ...