Here is one sample code for dynamic values from a text box.
<form>
<label>DynamicChartTitle</label>
<description>NULL</description>
<fieldset autoRun="true" submitButton="true">
<input type="text" token="chartTitle" searchWhenChanged="true">
<label>Chart Title</label>
<default>*</default>
</input>
</fieldset>
<row>
<chart>
<title>The chart tile is- $chartTitle$</title>
<searchString>
index=_internal source="*metrics.log"
group=per_sourcetype_thruput
| timechart sum(kb) by series
</searchString>
<earliestTime>-1h</earliestTime>
<latestTime>now</latestTime>
<option name="charting.data.fieldShowList">
["splunkd_access", "splunkd"]
</option>
<option name="charting.chart">line</option>
</chart>
</row>
</form>
Im using Splunk 6.0
What version of Splunk are you using?
yes i have it available in csv file.. or i can do a search to get the same from index?
please help me out with correct option to fetch in chart title
If the value is not available in dashboard, how are you planning to provide the 'dynamic' value to the chart title? Is it stored somewhere?
Hi,
Thanks for the response. But in my case i dont have a text box at the top.
The value to dispaly in first panel which is not available in dasbaord. Let me know how to achieve the same. Sample code please..
Hi,
You can use tokens in the title like $t_Bank$ and pass value form previous chart or filter:
<table>
<title>Top Errors for the Bank $t_Bank$ </title>
<searchString> ....</searchString>
<earliestTime> $earliest$ </earliestTime>
<latestTime> $latest$ </latestTime>
<option name="wrap">true</option>
</table>
so far i have not used filters for taking dynamic vlaues.. do u ahve any sample codes? plz share
How you are going to get values dynamically? through filter?
Anyhow you are taking the filter value into token, so you can use that token as mentioned. Pls let me know if does not work
Ya thnx for the response.. It looks this is achieved using drilldown logic.. but my chart is going to be first one.. so in that case how to write using filter.. any sample code plz...