<?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: How does the addinfo command work with time? in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/How-does-the-addinfo-command-work-with-time/m-p/370869#M5587</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170132"&gt;@Esky73&lt;/a&gt;, &lt;CODE&gt;| addinfo&lt;/CODE&gt; command adds search related metadata info to the search results so that the same can be reused. I think the documentation is fairly detailed as to what each for the &lt;CODE&gt;info_*&lt;/CODE&gt; fields do &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;info_min_time         : Earliest time selected for the search you ran (this would be the earliest time from the Time Picker that you run or else if you have used `earliest` parameter in the base search) 

info_max_time         : Latest time selected for the search you ran (this would be the latest time from the Time Picker that you run or else if you have used `latest` parameter in the base search)

info_sid              : The Search ID of the search job that generated the event/s. This will help you re-run the search or pull the results from the search using this ID. (REST endpoints reference are listed here: http://docs.splunk.com/Documentation/Splunk/latest/RESTTUT/RESTsearches#REST_endpoints_for_searches)

info_search_time      : The time when the Search job was executed. This would be the same as info_max_time when your latest time is `now()` or `@s`
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to see these values and understand how they work you can change the second query in the addinfo reference documentation like the following and re-run the search with different Time ranges:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt;
| stats latest(_time) AS latest_time BY host
| addinfo
| fieldformat latest_time=strftime(latest_time,"%c")
| fieldformat info_min_time=strftime(info_min_time,"%c")
| fieldformat info_max_time=strftime(info_max_time,"%c")
| fieldformat info_search_time=strftime(info_search_time,"%c")
| table host latest info_*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Actually in the query the pipe &lt;CODE&gt;| eval latest_age = info_max_time - latest_time, is used to calculate the&lt;/CODE&gt;age of last event received per host&lt;CODE&gt;, using latest event received per host (i.e. latest_time) by subtracting it from latest time which is being seen using&lt;/CODE&gt;latest from the time range picker` (i.e. info_max_time). Let us know if you require further details.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:26:28 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2020-09-29T15:26:28Z</dc:date>
    <item>
      <title>How does the addinfo command work with time?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-does-the-addinfo-command-work-with-time/m-p/370868#M5586</link>
      <description>&lt;P&gt;The new fields that are created when using the addinfo cmd&lt;/P&gt;

&lt;P&gt;info_min_time   The earliest time boundary for the search.&lt;BR /&gt;
info_max_time   The latest time boundary for the search.&lt;/P&gt;

&lt;P&gt;How are they calculated ?&lt;/P&gt;

&lt;P&gt;I've used the Example 2 as detailed here to create a search : &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Addinfo" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Addinfo&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Looking to find more info as to what the new created fields do.&lt;/P&gt;

&lt;P&gt;thx&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:22:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-does-the-addinfo-command-work-with-time/m-p/370868#M5586</guid>
      <dc:creator>Esky73</dc:creator>
      <dc:date>2020-09-29T15:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: How does the addinfo command work with time?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/How-does-the-addinfo-command-work-with-time/m-p/370869#M5587</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170132"&gt;@Esky73&lt;/a&gt;, &lt;CODE&gt;| addinfo&lt;/CODE&gt; command adds search related metadata info to the search results so that the same can be reused. I think the documentation is fairly detailed as to what each for the &lt;CODE&gt;info_*&lt;/CODE&gt; fields do &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;info_min_time         : Earliest time selected for the search you ran (this would be the earliest time from the Time Picker that you run or else if you have used `earliest` parameter in the base search) 

info_max_time         : Latest time selected for the search you ran (this would be the latest time from the Time Picker that you run or else if you have used `latest` parameter in the base search)

info_sid              : The Search ID of the search job that generated the event/s. This will help you re-run the search or pull the results from the search using this ID. (REST endpoints reference are listed here: http://docs.splunk.com/Documentation/Splunk/latest/RESTTUT/RESTsearches#REST_endpoints_for_searches)

info_search_time      : The time when the Search job was executed. This would be the same as info_max_time when your latest time is `now()` or `@s`
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to see these values and understand how they work you can change the second query in the addinfo reference documentation like the following and re-run the search with different Time ranges:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt;
| stats latest(_time) AS latest_time BY host
| addinfo
| fieldformat latest_time=strftime(latest_time,"%c")
| fieldformat info_min_time=strftime(info_min_time,"%c")
| fieldformat info_max_time=strftime(info_max_time,"%c")
| fieldformat info_search_time=strftime(info_search_time,"%c")
| table host latest info_*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Actually in the query the pipe &lt;CODE&gt;| eval latest_age = info_max_time - latest_time, is used to calculate the&lt;/CODE&gt;age of last event received per host&lt;CODE&gt;, using latest event received per host (i.e. latest_time) by subtracting it from latest time which is being seen using&lt;/CODE&gt;latest from the time range picker` (i.e. info_max_time). Let us know if you require further details.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:26:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/How-does-the-addinfo-command-work-with-time/m-p/370869#M5587</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-29T15:26:28Z</dc:date>
    </item>
  </channel>
</rss>

