Dashboard panel input time range is not getting reflected when i specify the specific time range, it is giving me the data for all time.
I have created a dashboard to monitor the logs from directory files and when i specify the time range to take the metrics for specified test time then the dash panel is not getting refreshed and giving all time metrics by pulling the data from all log files resides in the directory files
The problem is that your time-picker isn't wired up to your panel - the "earliest" and "latest" tags in the panel need to use the token produced by the time picker.
Here's an example of that:
<form>
<label>HTTP Listener Events</label>
<fieldset submitButton="false">
<input type="time" token="field1">
<label></label>
<default>
<earliest>0</earliest>
<latest></latest>
</default>
</input>
</fieldset>
<row>
<panel>
<event>
<search>
<query>index=_internal sourcetype=splunkd HttpListener | dedup message</query>
<earliest>0</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">50</option>
<option name="list.drilldown">full</option>
<option name="list.wrap">1</option>
<option name="maxLines">5</option>
<option name="raw.drilldown">full</option>
<option name="rowNumbers">0</option>
<option name="table.drilldown">all</option>
<option name="table.sortDirection">asc</option>
<option name="table.wrap">1</option>
<option name="type">list</option>
</event>
</panel>
</row>
</form>
Note the and tags in the panel. You probably have something similar to that. To fix it you can edit the xml directly, or use the gui:
You should end up with something like this:
<form>
<label>HTTP Listener Events</label>
<fieldset submitButton="false">
<input type="time" token="field1">
<label></label>
<default>
<earliest>0</earliest>
<latest></latest>
</default>
</input>
</fieldset>
<row>
<panel>
<event>
<search>
<query>index=_internal sourcetype=splunkd HttpListener | dedup message</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">50</option>
<option name="list.drilldown">full</option>
<option name="list.wrap">1</option>
<option name="maxLines">5</option>
<option name="raw.drilldown">full</option>
<option name="rowNumbers">0</option>
<option name="table.drilldown">all</option>
<option name="table.sortDirection">asc</option>
<option name="table.wrap">1</option>
<option name="type">list</option>
</event>
</panel>
</row>
</form>
The problem is that your time-picker isn't wired up to your panel - the "earliest" and "latest" tags in the panel need to use the token produced by the time picker.
Here's an example of that:
<form>
<label>HTTP Listener Events</label>
<fieldset submitButton="false">
<input type="time" token="field1">
<label></label>
<default>
<earliest>0</earliest>
<latest></latest>
</default>
</input>
</fieldset>
<row>
<panel>
<event>
<search>
<query>index=_internal sourcetype=splunkd HttpListener | dedup message</query>
<earliest>0</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">50</option>
<option name="list.drilldown">full</option>
<option name="list.wrap">1</option>
<option name="maxLines">5</option>
<option name="raw.drilldown">full</option>
<option name="rowNumbers">0</option>
<option name="table.drilldown">all</option>
<option name="table.sortDirection">asc</option>
<option name="table.wrap">1</option>
<option name="type">list</option>
</event>
</panel>
</row>
</form>
Note the and tags in the panel. You probably have something similar to that. To fix it you can edit the xml directly, or use the gui:
You should end up with something like this:
<form>
<label>HTTP Listener Events</label>
<fieldset submitButton="false">
<input type="time" token="field1">
<label></label>
<default>
<earliest>0</earliest>
<latest></latest>
</default>
</input>
</fieldset>
<row>
<panel>
<event>
<search>
<query>index=_internal sourcetype=splunkd HttpListener | dedup message</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">50</option>
<option name="list.drilldown">full</option>
<option name="list.wrap">1</option>
<option name="maxLines">5</option>
<option name="raw.drilldown">full</option>
<option name="rowNumbers">0</option>
<option name="table.drilldown">all</option>
<option name="table.sortDirection">asc</option>
<option name="table.wrap">1</option>
<option name="type">list</option>
</event>
</panel>
</row>
</form>
Many thanks Greg. i was hanging around for many hours to resolve this. it is working now as per the suggestion. thanks much
You need to share your XML for the community to accurately help you.
The likely culprit is a disconnect on how you define the timpicker input token versus how that token is or is not referenced in the search. Your specific XML will help pinpoint this.