Dashboards & Visualizations

independent time picker for each panel in simple XML

vikas_gopal
Builder

Hi Experts,

I was wondering if it's possible in simple XML in Splunk 6.2 version to have independent time picker for panels for example I have 3 panels in my form and I want each panel should have it's own time picker.I am aware it is possible in advance XML .

Please suggest

Tags (2)
0 Karma
1 Solution

Raghav2384
Motivator
Hello Vikas,

Yes it is possible to have individual time pickers for panels. Please see Splunk 6.x simple xml examples app. There's an example called 

"Time Range Picker Within Panels"  . Here's the sample xml

 <form>
2.    <label>Time Range Picker Within Panels</label>
3.    <description>Example of placing a time range picker within a panel.</description>
4.    <row>
5.      <panel>
6.        <input type="time" token="time_range1">
7.          <label>Time Range for Internal All</label>
8.          <default>
9.            <earliestTime>-60m@m</earliestTime>
10.          <latestTime>now</latestTime>
11.        </default>
12.      </input>
13.      <chart>
14.        <title>_Internal All</title>
15.        <searchString>index=_internal | timechart count by sourcetype</searchString>
16.        <earliestTime>$time_range1.earliest$</earliestTime>
17.        <latestTime>$time_range1.latest$</latestTime>
18.        <option name="charting.chart">line</option>
19.        <option name="charting.chart.nullValueMode">gaps</option>
20.        <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
21.        <option name="charting.chart.stackMode">default</option>
22.        <option name="charting.chart.style">shiny</option>
23.        <option name="charting.drilldown">all</option>
24.        <option name="charting.layout.splitSeries">0</option>
25.        <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
26.        <option name="charting.legend.placement">right</option>
27.      </chart>
28.    </panel>
29.    <panel>
30.      <input type="time" token="time_range2" searchWhenChanged="true">
31.        <label>Time Range for Internal Top 25</label>
32.        <default>
33.          <earliestTime>@d</earliestTime>
34.          <latestTime>now</latestTime>
35.        </default>
36.      </input>
37.      <event>
38.        <title>_Internal Top 3</title>
39.        <searchString>index=_internal  | head 3</searchString>
40.        <earliestTime>$time_range2.earliest$</earliestTime>
41.        <latestTime>$time_range2.latest$</latestTime>
42.        <option name="maxLines">5</option>
43.        <option name="raw.drilldown">full</option>
44.        <option name="rowNumbers">0</option>
45.        <option name="type">list</option>
46.        <option name="count">5</option>
47.      </event>
48.    </panel>
49.  </row>
50.</form>

Hope this helps!

Thanks,
Raghav

View solution in original post

Raghav2384
Motivator
Hello Vikas,

Yes it is possible to have individual time pickers for panels. Please see Splunk 6.x simple xml examples app. There's an example called 

"Time Range Picker Within Panels"  . Here's the sample xml

 <form>
2.    <label>Time Range Picker Within Panels</label>
3.    <description>Example of placing a time range picker within a panel.</description>
4.    <row>
5.      <panel>
6.        <input type="time" token="time_range1">
7.          <label>Time Range for Internal All</label>
8.          <default>
9.            <earliestTime>-60m@m</earliestTime>
10.          <latestTime>now</latestTime>
11.        </default>
12.      </input>
13.      <chart>
14.        <title>_Internal All</title>
15.        <searchString>index=_internal | timechart count by sourcetype</searchString>
16.        <earliestTime>$time_range1.earliest$</earliestTime>
17.        <latestTime>$time_range1.latest$</latestTime>
18.        <option name="charting.chart">line</option>
19.        <option name="charting.chart.nullValueMode">gaps</option>
20.        <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
21.        <option name="charting.chart.stackMode">default</option>
22.        <option name="charting.chart.style">shiny</option>
23.        <option name="charting.drilldown">all</option>
24.        <option name="charting.layout.splitSeries">0</option>
25.        <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
26.        <option name="charting.legend.placement">right</option>
27.      </chart>
28.    </panel>
29.    <panel>
30.      <input type="time" token="time_range2" searchWhenChanged="true">
31.        <label>Time Range for Internal Top 25</label>
32.        <default>
33.          <earliestTime>@d</earliestTime>
34.          <latestTime>now</latestTime>
35.        </default>
36.      </input>
37.      <event>
38.        <title>_Internal Top 3</title>
39.        <searchString>index=_internal  | head 3</searchString>
40.        <earliestTime>$time_range2.earliest$</earliestTime>
41.        <latestTime>$time_range2.latest$</latestTime>
42.        <option name="maxLines">5</option>
43.        <option name="raw.drilldown">full</option>
44.        <option name="rowNumbers">0</option>
45.        <option name="type">list</option>
46.        <option name="count">5</option>
47.      </event>
48.    </panel>
49.  </row>
50.</form>

Hope this helps!

Thanks,
Raghav

vikas_gopal
Builder

How could I miss that.
Thank you Raghav

0 Karma

anwarmian
Communicator

Very nice example Raghav. Things to remember are the following:

$time_range1.earliest$
$time_range1.latest$
index=_internal | timechart count by sourcetype
Use ... and NOT ....

0 Karma

ronak
Path Finder

Hi Raghav

My name is Ronak...It seems that you have some good experience with Splunk. Could use some assistance , pointers in couple of areas where I'm stuck. Would you mind dropping your contact details ? I'm at ronak@venuenext.com

thanks, ronak

0 Karma

Raghav2384
Motivator

Hey ronak, i absolutely do not mind helping. Just want to let you know, there are some Splunk Saints actively answering questions here...We all have been there :). Feel free to siphon through this forum and the chances of you finding better answer than mine are 100% 🙂

Thanks,
Raghav
Raghav.vicky23@outlook.com

0 Karma

Raghav2384
Motivator

Oh let's not hijack vikas's post. Cheers!

0 Karma

Raghav2384
Motivator

Like a wise man once said, it happens to the best of us 🙂

0 Karma

markthompson
Builder

Hi @vikas_gopal
I believe this is the case and it is possible inside of Simple XML.

Just read through some documentation from Splunk that says it is a new feature in 6.2 so I would think it's possible.

0 Karma

vikas_gopal
Builder

I believe so but did not find any link yet.

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...