I have a panel which displays the software installed and uninstalled for the last month.
Mow i want the panel title to change dynamically e.g. "Software installed/uninstalled for the month of x" where x is dynamic.
Can someone help me with this?
Hi,
Try something like below,
<form>
<label>test</label>
<fieldset submitButton="false">
<input type="time" token="time">
<label></label>
</input>
</fieldset>
<search id="baseSearch">
<query>| makeresults | eval earliest=if(match("$time.earliest$","^-"),strftime((relative_time(now(),"$time.earliest$")),"%B"),strftime("$time.earliest$","%B"))</query>
<earliest>$time.earliest$</earliest>
<latest>$time.latest$</latest>
<done>
<set token="month">$result.earliest$</set>
</done>
</search>
<row>
<panel>
<title>Softwares Installed/Unistalled in month of $month$</title>
<table>
<search>
<query>your search</query>
<earliest>$time.earliest$</earliest>
<latest>$time.latest$</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">100</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">none</option>
<option name="percentagesRow">false</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
</table>
</panel>
</row>
</form>
baseSearch will format the month from earliest time from time range picker. you can choose relative time some thing like last 60 mins or choose date from Date range in both the cases it will work.
Happy Splunking...
Please do not forget to vote if it works.
Set the search result as a token and realize it.
Please refer to the answer of Mr. somesoni2 of this answer.
https://answers.splunk.com/answers/463937/how-to-reference-a-dashboard-token-in-an-html-pane.html
Where do you get the year / month information? Is the search result?
@HiroshiSatoh
Yes, I have a panel which tells the software installed and uninstalled on a server and its date for last month. so it shows in the result