我创建了一个仪表板,其中没有几个输入选择器和不同的面板。当我导出为PDF时,只会导出图表。我需要单击交互式图表右下角的“打开搜索”按钮以生成URL,然后将其导出为PDF。
如果可能的话,查询需要在splunk仪表板中不可见。
谢谢。
答案 0 :(得分:0)
您可以在html
面板中包含令牌的值,该面板可用于随后显示正在运行的查询。看下面的例子。
<form>
<label>SO Test</label>
<fieldset submitButton="true">
<input type="text" token="idx">
<label>Index</label>
<default>*</default>
</input>
</fieldset>
<row>
<html>
<pre>index=$idx$ | stats count by source</pre>
</html>
</row>
<row>
<panel>
<chart>
<search>
<query>index=$idx$ | stats count by source</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="charting.chart">pie</option>
<option name="charting.drilldown">none</option>
<option name="refresh.display">progressbar</option>
</chart>
</panel>
</row>
</form>
在您的情况下,您可能有多个面板,每个面板可能会有不同的查询。您可以使用多个html
元素,也可以仅将令牌的值放在开头。