<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Earliest latest in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Earliest-latest/m-p/399336#M11229</link>
    <description>&lt;P&gt;@Mohsin123 , you have defined two tokens &lt;CODE&gt;tokEarliest&lt;/CODE&gt; and &lt;CODE&gt;tokLatest&lt;/CODE&gt;, but although some of your search query is not visible, but seems like you are using tokens &lt;CODE&gt;$earliest$&lt;/CODE&gt; and &lt;CODE&gt;$latest$&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Also on a different note when you use &lt;CODE&gt;&amp;lt;eval&amp;gt;&lt;/CODE&gt; to set a token for time it would use current system time zone (expecting that to be issue here as Hours seem to have shifted by  4 hours.)&lt;/P&gt;

&lt;P&gt;Try to use an independent search to set the tokens instead as explained in the following answer of mine to set the earliest and latest time tokens: &lt;A href="https://answers.splunk.com/answers/578984/running-one-of-two-searches-based-on-time-picker-s.html"&gt;https://answers.splunk.com/answers/578984/running-one-of-two-searches-based-on-time-picker-s.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Also validate with string time to ensure that token is getting set properly first!&lt;/P&gt;</description>
    <pubDate>Sat, 11 Aug 2018 12:06:07 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2018-08-11T12:06:07Z</dc:date>
    <item>
      <title>Earliest latest</title>
      <link>https://community.splunk.com/t5/Alerting/Earliest-latest/m-p/399332#M11225</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am using a  formula but this isnt working as expected&lt;BR /&gt;
trying to make a check box , which will give earliest time t the input value field + 5 min&lt;BR /&gt;
and latest to the input value field + 4 hrs&lt;BR /&gt;
But the timechart query below doesnt work right&lt;BR /&gt;
if i am taking the default value 10pm&lt;BR /&gt;
then the earliest should be : 10.05 pm and latest 2 am&lt;BR /&gt;
but the timechart shows 6pm-10pm&lt;/P&gt;

&lt;P&gt;Please help&lt;/P&gt;

&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/201110"&gt;@niketn&lt;/a&gt; &lt;/P&gt;

&lt;P&gt;i used this link by you :&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/613054/can-i-set-a-latest-relative-to-an-absolute-earlies.html" target="_blank"&gt;https://answers.splunk.com/answers/613054/can-i-set-a-latest-relative-to-an-absolute-earlies.html&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;title&amp;gt;Response time (avg) and Response time overall average&amp;lt;/title&amp;gt;
  &amp;lt;input type="text" token="tokSelectEarliestTime" searchWhenChanged="true"&amp;gt;
    &amp;lt;label&amp;gt;Earliest Time&amp;lt;/label&amp;gt;
    &amp;lt;default&amp;gt;01/08/2018:10:00:00&amp;lt;/default&amp;gt;
    &amp;lt;change&amp;gt;
      &amp;lt;eval token="tokEarliest"&amp;gt;strptime($value$,"%m/%d/%Y:%H:%M:%S")+300&amp;lt;/eval&amp;gt;
      &amp;lt;eval token="tokLatest"&amp;gt;strptime($value$,"%m/%d/%Y:%H:%M:%S")+14400&amp;lt;/eval&amp;gt;
    &amp;lt;/change&amp;gt;
  &amp;lt;/input&amp;gt;
  &amp;lt;single&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;index="idxx" sourcetype IN ("kaf") component=$component$ (logpoint=request-in OR logpoint=response-out) earliest=$tokEarliest$ latest=$tokLatest$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;| stats earliest(_time) as earliest_time, latest(_time) as latest_time by component,transaction-id &lt;BR /&gt;
| eval duration=latest_time-earliest_time &lt;BR /&gt;
| stats avg(duration) as ResponseTime&lt;BR /&gt;
 $earliest$&lt;BR /&gt;
          &lt;LATEST&gt;$latest$&lt;/LATEST&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;/search&amp;gt;
    &amp;lt;option name="colorBy"&amp;gt;value&amp;lt;/option&amp;gt;
    &amp;lt;option name="colorMode"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="height"&amp;gt;80&amp;lt;/option&amp;gt;
    &amp;lt;option name="linkView"&amp;gt;search&amp;lt;/option&amp;gt;
    &amp;lt;option name="numberPrecision"&amp;gt;0.00&amp;lt;/option&amp;gt;
    &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
    &amp;lt;option name="showSparkline"&amp;gt;1&amp;lt;/option&amp;gt;
    &amp;lt;option name="showTrendIndicator"&amp;gt;1&amp;lt;/option&amp;gt;
    &amp;lt;option name="trendColorInterpretation"&amp;gt;standard&amp;lt;/option&amp;gt;
    &amp;lt;option name="trendDisplayMode"&amp;gt;absolute&amp;lt;/option&amp;gt;
    &amp;lt;option name="useColors"&amp;gt;0&amp;lt;/option&amp;gt;
    &amp;lt;option name="useThousandSeparators"&amp;gt;1&amp;lt;/option&amp;gt;
  &amp;lt;/single&amp;gt;
  &amp;lt;chart&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;index="idx" sourcetype IN ("ka") component=$component$ (logpoint=request-in OR logpoint=response-out) earliest=$tokEarliest$ latest=$tokLatest$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;| stats earliest(_time) as earliest_time, latest(_time) as latest_time by component,transaction-id &lt;BR /&gt;
| eval duration=latest_time-earliest_time &lt;BR /&gt;
| eval _time=earliest_time &lt;BR /&gt;
| timechart span=1h, avg(duration) as avg_resp&lt;BR /&gt;
 $earliest$&lt;BR /&gt;
          &lt;LATEST&gt;$latest$&lt;/LATEST&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;/search&amp;gt;
    &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.overflowMode"&amp;gt;ellipsisNone&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.rotation"&amp;gt;0&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.axisTitleX.text"&amp;gt;Time&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.axisTitleX.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.axisTitleY.text"&amp;gt;Resp. Time (sec)&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.axisTitleY.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.axisTitleY2.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.axisX.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.axisY.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.axisY2.enabled"&amp;gt;0&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.axisY2.scale"&amp;gt;inherit&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.chart.bubbleMaximumSize"&amp;gt;50&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.chart.bubbleMinimumSize"&amp;gt;10&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.chart.bubbleSizeBy"&amp;gt;area&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.chart.nullValueMode"&amp;gt;zero&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.chart.showDataLabels"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.chart.sliceCollapsingThreshold"&amp;gt;0.01&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.chart.stackMode"&amp;gt;default&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.chart.style"&amp;gt;shiny&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.layout.splitSeries"&amp;gt;0&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.layout.splitSeries.allowIndependentYRanges"&amp;gt;0&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.legend.labelStyle.overflowMode"&amp;gt;ellipsisMiddle&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.legend.placement"&amp;gt;bottom&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.seriesColors"&amp;gt;[0x990099]&amp;lt;/option&amp;gt;
    &amp;lt;option name="height"&amp;gt;350&amp;lt;/option&amp;gt;
    &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
  &amp;lt;/chart&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:50:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Earliest-latest/m-p/399332#M11225</guid>
      <dc:creator>Mohsin123</dc:creator>
      <dc:date>2020-09-29T20:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Earliest latest</title>
      <link>https://community.splunk.com/t5/Alerting/Earliest-latest/m-p/399333#M11226</link>
      <description>&lt;P&gt;@niketnilay  can u pls help here&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 23:37:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Earliest-latest/m-p/399333#M11226</guid>
      <dc:creator>Mohsin123</dc:creator>
      <dc:date>2018-08-10T23:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Earliest latest</title>
      <link>https://community.splunk.com/t5/Alerting/Earliest-latest/m-p/399334#M11227</link>
      <description>&lt;P&gt;@woodcock  could you please help here&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 23:37:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Earliest-latest/m-p/399334#M11227</guid>
      <dc:creator>Mohsin123</dc:creator>
      <dc:date>2018-08-10T23:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Earliest latest</title>
      <link>https://community.splunk.com/t5/Alerting/Earliest-latest/m-p/399335#M11228</link>
      <description>&lt;P&gt;@renjith.nair  Hi Renjith, could you pls help here , hope u remb me ...i reported u  mistakenly while rewarding you &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 23:38:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Earliest-latest/m-p/399335#M11228</guid>
      <dc:creator>Mohsin123</dc:creator>
      <dc:date>2018-08-10T23:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Earliest latest</title>
      <link>https://community.splunk.com/t5/Alerting/Earliest-latest/m-p/399336#M11229</link>
      <description>&lt;P&gt;@Mohsin123 , you have defined two tokens &lt;CODE&gt;tokEarliest&lt;/CODE&gt; and &lt;CODE&gt;tokLatest&lt;/CODE&gt;, but although some of your search query is not visible, but seems like you are using tokens &lt;CODE&gt;$earliest$&lt;/CODE&gt; and &lt;CODE&gt;$latest$&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Also on a different note when you use &lt;CODE&gt;&amp;lt;eval&amp;gt;&lt;/CODE&gt; to set a token for time it would use current system time zone (expecting that to be issue here as Hours seem to have shifted by  4 hours.)&lt;/P&gt;

&lt;P&gt;Try to use an independent search to set the tokens instead as explained in the following answer of mine to set the earliest and latest time tokens: &lt;A href="https://answers.splunk.com/answers/578984/running-one-of-two-searches-based-on-time-picker-s.html"&gt;https://answers.splunk.com/answers/578984/running-one-of-two-searches-based-on-time-picker-s.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Also validate with string time to ensure that token is getting set properly first!&lt;/P&gt;</description>
      <pubDate>Sat, 11 Aug 2018 12:06:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Earliest-latest/m-p/399336#M11229</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-08-11T12:06:07Z</dc:date>
    </item>
  </channel>
</rss>

