<?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 Post process Search in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Post-process-Search/m-p/283449#M5326</link>
    <description>&lt;P&gt;Hey all,&lt;/P&gt;

&lt;P&gt;I would like to automatically apply  some logic to the end of any alert which will help guide users to snap to a particular timeframe around an event (without having to rely on SID lifespan or generated links).&lt;/P&gt;

&lt;P&gt;What I'm waiting to do --  I'm wanting to expose  epoch times for earliest and latest that  user can just paste into the a search to snap to the same time period.  The logic I'm wanting to postpend is this-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | addinfo | rename info_sid AS _info_sid | rename info_max_time AS _info_max_time | rename info_min_time AS _info_min_time | rename info_search_time AS _info_search_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm testing this on Splunk 6.3 --  if I append this manually to a search, it works, but I would like to hide this logic from the end users.   Any suggestions?&lt;/P&gt;

&lt;P&gt;At the end of the day I would like to print something similar to this in the generated email message:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=$result._info_min_time$
latest=$result._info_max_time$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which would produce something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=1445285820.000
latest=1445285881.137
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The following isn't in the correct timestamp format for users to be able to cut and paste into the searches:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Report started       : $job.earliestTime$ 
Report finished      : $job.latestTime$ 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;as it shows up like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Report started : 2015-10-19T20:17:00.000+00:00 
Report finished : 2015-10-19T20:18:01.939+00:00 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 19 Oct 2015 20:57:09 GMT</pubDate>
    <dc:creator>adylent</dc:creator>
    <dc:date>2015-10-19T20:57:09Z</dc:date>
    <item>
      <title>Post process Search</title>
      <link>https://community.splunk.com/t5/Reporting/Post-process-Search/m-p/283449#M5326</link>
      <description>&lt;P&gt;Hey all,&lt;/P&gt;

&lt;P&gt;I would like to automatically apply  some logic to the end of any alert which will help guide users to snap to a particular timeframe around an event (without having to rely on SID lifespan or generated links).&lt;/P&gt;

&lt;P&gt;What I'm waiting to do --  I'm wanting to expose  epoch times for earliest and latest that  user can just paste into the a search to snap to the same time period.  The logic I'm wanting to postpend is this-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | addinfo | rename info_sid AS _info_sid | rename info_max_time AS _info_max_time | rename info_min_time AS _info_min_time | rename info_search_time AS _info_search_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm testing this on Splunk 6.3 --  if I append this manually to a search, it works, but I would like to hide this logic from the end users.   Any suggestions?&lt;/P&gt;

&lt;P&gt;At the end of the day I would like to print something similar to this in the generated email message:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=$result._info_min_time$
latest=$result._info_max_time$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which would produce something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=1445285820.000
latest=1445285881.137
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The following isn't in the correct timestamp format for users to be able to cut and paste into the searches:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Report started       : $job.earliestTime$ 
Report finished      : $job.latestTime$ 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;as it shows up like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Report started : 2015-10-19T20:17:00.000+00:00 
Report finished : 2015-10-19T20:18:01.939+00:00 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 20:57:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Post-process-Search/m-p/283449#M5326</guid>
      <dc:creator>adylent</dc:creator>
      <dc:date>2015-10-19T20:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Post process Search</title>
      <link>https://community.splunk.com/t5/Reporting/Post-process-Search/m-p/283450#M5327</link>
      <description>&lt;P&gt;What you are asking is impossible.&lt;/P&gt;

&lt;P&gt;Here is a list of the variables that you can include:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.0/Report/Schedulereports#Use_tokens_in_scheduled_report_email_subjects_and_bodies"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.0/Report/Schedulereports#Use_tokens_in_scheduled_report_email_subjects_and_bodies&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You are correct that the $job variables that you noted apply to the time during which the search itself ran, not the timeframe over which the data was constrained.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 21:47:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Post-process-Search/m-p/283450#M5327</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-10-19T21:47:12Z</dc:date>
    </item>
  </channel>
</rss>

