I would like to set some constant values for use in tags in multiple panels of my dashboard (earliest time, latest time, sampling rate, etc.). This dashboard needs to run at pre-scheduled time and send a pdf report.
I set the tokens in <init> element at the beginning of the dashboard. However, per article https://docs.splunk.com/Documentation/Splunk/8.0.5/Viz/tokens, PDF scheduling is disabled for dashboards and forms that include an <init> element. This is what I am experiencing; the dashboard renders ok, but PDF job fails.
Is there another option to define constant values that can be used in tags in other panel queries? I am deploying these dashboards in enterprise environment, and am looking for a solution within dashboard xml. Creating any additional configuration files is not easy to deploy or modify.
Current solution (fails for PDF generation):
<init>
<set token="sampling">20</set>
<set token="earliest">@w0-7d</set>
<set token="latest">@w0</set>
</init>
...
<query>index=xxxx | stats count by internal build </query>
<earliest>$earliest$</earliest>
<latest>$latest$</latest>
<sampleRatio>$sampling$</sampleRatio>
... View more