<?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 to get a transaction command to work with a combination of indexTime and another field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-transaction-command-to-work-with-a-combination-of/m-p/202005#M58582</link>
    <description>&lt;P&gt;It seems what you need is not a transaction, but a streamstats instead.  append this to your SPML query:&lt;/P&gt;

&lt;P&gt;| SORT "Type of Report", "Report Sub Type", "Report Generation Start Time", - _indextime&lt;BR /&gt;
| STREAMSTATS current=t reset_on_change=t first(_indextime) as "first_time" last(_indextime) as "current_time" by "Type of Report", "Report Sub Type", "Report Generation Start Time"&lt;BR /&gt;
| EVAL isfirst=IF(first_time==current_time, 1, 0)&lt;BR /&gt;
| SEARCH isfirst=1&lt;/P&gt;

&lt;P&gt;It should show you only the "last line" (max _indextime) for each report you generated&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 11:03:56 GMT</pubDate>
    <dc:creator>haley_swarnapat</dc:creator>
    <dc:date>2020-09-29T11:03:56Z</dc:date>
    <item>
      <title>How to get a transaction command to work with a combination of indexTime and another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-transaction-command-to-work-with-a-combination-of/m-p/202003#M58580</link>
      <description>&lt;P&gt;Good Afternoon Splunk,&lt;/P&gt;

&lt;P&gt;I have a question about some data that I am trying to evaluate for the transaction command. Below I have a snapshot of the data I am trying to get a the transaction statement to work but I have to be somewhat creative. &lt;/P&gt;

&lt;P&gt;The goal is that I am trying to get the last event in this transaction, the max or last value. I believe to signify the transaction I may be able to start with the "Send To State" field as that is always = 0&lt;/P&gt;

&lt;P&gt;But the end of the transaction I am having some trouble with, as you can see the data is not all that helpful. &lt;/P&gt;

&lt;P&gt;My anticipated query for index time. Seems to at least pick up values in steps. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval IndexTime=strftime(_indextime, "%Y-%m-%d %H:%M:%S")   
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Somehow I would like to correlate the index time and another field so that I may then say &lt;BR /&gt;
SendToState was the beginning of this and the end was the combination of an indextime and some other field, but I am at a loss what I could do. Any help would be appreciated.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Daniel MacGillivray&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1876i1438A7DFA692E16F/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 19:10:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-transaction-command-to-work-with-a-combination-of/m-p/202003#M58580</guid>
      <dc:creator>dmacgillivray</dc:creator>
      <dc:date>2016-09-20T19:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a transaction command to work with a combination of indexTime and another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-transaction-command-to-work-with-a-combination-of/m-p/202004#M58581</link>
      <description>&lt;P&gt;What would "a transaction" look like? What defines a transaction - same type/sub-type of report? How does "IndexTime"  affect the transaction?&lt;/P&gt;

&lt;P&gt;It might be helpful to see the entire search string that you have so far...&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 00:24:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-transaction-command-to-work-with-a-combination-of/m-p/202004#M58581</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-09-21T00:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a transaction command to work with a combination of indexTime and another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-transaction-command-to-work-with-a-combination-of/m-p/202005#M58582</link>
      <description>&lt;P&gt;It seems what you need is not a transaction, but a streamstats instead.  append this to your SPML query:&lt;/P&gt;

&lt;P&gt;| SORT "Type of Report", "Report Sub Type", "Report Generation Start Time", - _indextime&lt;BR /&gt;
| STREAMSTATS current=t reset_on_change=t first(_indextime) as "first_time" last(_indextime) as "current_time" by "Type of Report", "Report Sub Type", "Report Generation Start Time"&lt;BR /&gt;
| EVAL isfirst=IF(first_time==current_time, 1, 0)&lt;BR /&gt;
| SEARCH isfirst=1&lt;/P&gt;

&lt;P&gt;It should show you only the "last line" (max _indextime) for each report you generated&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:03:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-transaction-command-to-work-with-a-combination-of/m-p/202005#M58582</guid>
      <dc:creator>haley_swarnapat</dc:creator>
      <dc:date>2020-09-29T11:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a transaction command to work with a combination of indexTime and another field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-transaction-command-to-work-with-a-combination-of/m-p/202006#M58583</link>
      <description>&lt;P&gt;Thanks Haley, as I was thinking about what Lguinn said to me previously,  I found it difficult to have a transaction without values that were really going to work similar to a Web or VPN or some other type of transactional type logic. &lt;/P&gt;

&lt;P&gt;Thanks everyone for your assistance, and working with me on this. &lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 15:52:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-transaction-command-to-work-with-a-combination-of/m-p/202006#M58583</guid>
      <dc:creator>dmacgillivray</dc:creator>
      <dc:date>2016-09-21T15:52:46Z</dc:date>
    </item>
  </channel>
</rss>

