<?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 can I combine the events to bring it back as 1 event or even for it to show just a list of fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-the-events-to-bring-it-back-as-1-event-or-even/m-p/385740#M168849</link>
    <description>&lt;P&gt;Thanks Ayn, Thats done the trick. This now gives me the next step to connect more dots as it was bugging me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Also like you say the transaction was too costly so went with the stats which was alot better&lt;/P&gt;</description>
    <pubDate>Sun, 17 Jun 2018 19:34:23 GMT</pubDate>
    <dc:creator>Sfry1981</dc:creator>
    <dc:date>2018-06-17T19:34:23Z</dc:date>
    <item>
      <title>How can I combine the events to bring it back as 1 event or even for it to show just a list of fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-the-events-to-bring-it-back-as-1-event-or-even/m-p/385738#M168847</link>
      <description>&lt;P&gt;I have a search like this where it brings back a history of an event based on the guid. The last event has the information about the error but the first event has the information about the ID of the user under a_tid. I have mapped out the searches below for info:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nameofindex Microservice "Instance errored" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This brings back the below event&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;a_time="2018-06-15 21:26:49,836", a_tid="(null)", a_rid="71111111-3be2-46ea-a91e-f635b785a750",  a_msg="Instance errored"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now if I search with the guid ID as per the below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nameofindex a_rid="71111111-3be2-46ea-a91e-f635b785a750"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the below events:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;a_time="2018-06-15 21:26:49,836", a_tid="(null)", a_rid="71111111-3be2-46ea-a91e-f635b785a750",  a_msg="Instance errored"

a_time="2018-06-15 21:26:49,671", a_tid="10132", a_rid="71111111-3be2-46ea-a91e-f635b785a750",  a_tid="00001" a_msg="Registering instance"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I want to do is perform the first search  but I want to pull through a list of the a_tid that has an ID like the above which shows 'a_tid="00001" '&lt;/P&gt;

&lt;P&gt;Ideally I would like the event to show as the below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;a_time="2018-06-15 21:26:49,836", a_rid="71111111-3be2-46ea-a91e-f635b785a750",  a_msg="Instance errored", a_tid="00001"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So the link is there on the event history but how can I combine the events to bring it back as 1 event or even for it to show just a list of a_tid?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:01:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-the-events-to-bring-it-back-as-1-event-or-even/m-p/385738#M168847</guid>
      <dc:creator>Sfry1981</dc:creator>
      <dc:date>2020-09-29T20:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: How can I combine the events to bring it back as 1 event or even for it to show just a list of fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-the-events-to-bring-it-back-as-1-event-or-even/m-p/385739#M168848</link>
      <description>&lt;P&gt;I would write a subsearch for retrieving all a_rid values for events with the "Instance errored" message, then either run &lt;CODE&gt;transaction&lt;/CODE&gt; or &lt;CODE&gt;stats&lt;/CODE&gt; for getting the desired results. I noticed you say you're searching for "Microservice" but the example event you show doesn't actually have that string in it - maybe you meant &lt;CODE&gt;sourcetype=Microservice&lt;/CODE&gt; or something? I'm assuming this in my query below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nameofindex [search index=nameofindex sourcetype=Microservice "Instance errored" | fields a_rid] | transaction a_rid | search a_tid=00001
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...or similarly using &lt;CODE&gt;stats&lt;/CODE&gt;, which is cheaper from a performance perspective:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nameofindex [search index=nameofindex sourcetype=Microservice "Instance errored" | fields a_rid] | stats values(a_tid) as a_tid by a_rid | search a_tid=00001
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 17 Jun 2018 09:38:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-the-events-to-bring-it-back-as-1-event-or-even/m-p/385739#M168848</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2018-06-17T09:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can I combine the events to bring it back as 1 event or even for it to show just a list of fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-the-events-to-bring-it-back-as-1-event-or-even/m-p/385740#M168849</link>
      <description>&lt;P&gt;Thanks Ayn, Thats done the trick. This now gives me the next step to connect more dots as it was bugging me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Also like you say the transaction was too costly so went with the stats which was alot better&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jun 2018 19:34:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-the-events-to-bring-it-back-as-1-event-or-even/m-p/385740#M168849</guid>
      <dc:creator>Sfry1981</dc:creator>
      <dc:date>2018-06-17T19:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can I combine the events to bring it back as 1 event or even for it to show just a list of fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-the-events-to-bring-it-back-as-1-event-or-even/m-p/385741#M168850</link>
      <description>&lt;P&gt;Cool, there's also &lt;CODE&gt;eventstats&lt;/CODE&gt; that does the same as &lt;CODE&gt;stats&lt;/CODE&gt; but keeps all data from the original events, if that helps.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jun 2018 21:55:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-combine-the-events-to-bring-it-back-as-1-event-or-even/m-p/385741#M168850</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2018-06-17T21:55:08Z</dc:date>
    </item>
  </channel>
</rss>

