<?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: Listing on all the field values of a transaction event in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288519#M162855</link>
    <description>&lt;P&gt;Try to use &lt;CODE&gt;list&lt;/CODE&gt; instead of &lt;CODE&gt;values&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | stats count list(Message), list(Location) by somefield
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 16 Feb 2018 01:18:39 GMT</pubDate>
    <dc:creator>493669</dc:creator>
    <dc:date>2018-02-16T01:18:39Z</dc:date>
    <item>
      <title>Listing on all the field values of a transaction event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288518#M162854</link>
      <description>&lt;P&gt;I have created a transaction event based on the startswith and endswith functions. This new transaction event has clubbed all the original events into one event which has now got multiple fields with different field values.&lt;/P&gt;

&lt;P&gt;For ex :&lt;/P&gt;

&lt;P&gt;Event 1 , Message = A, Location = USA&lt;BR /&gt;
Event 2, Message = B, Location = INDIA&lt;BR /&gt;
Event 3, Message = C, Location = Mexico&lt;BR /&gt;
Event 4, Message = D, Location = INDIA&lt;/P&gt;

&lt;P&gt;Transaction Event:&lt;BR /&gt;
 Message = A, Location = USA&lt;BR /&gt;
 Message = B, Location = INDIA&lt;BR /&gt;
 Message = C, Location = Mexico&lt;BR /&gt;
 Message = D, Location = INDIA&lt;/P&gt;

&lt;P&gt;Now since all the events are clubbed into one using the transaction command. How do i get all the field values of the field Location and Message. If i use | stats count values(Message),values(Location) by somefield. it is just showing me the unique values of Message and Location field. skipping the repeating ones. &lt;/P&gt;

&lt;P&gt;I dont want to skip anything. Whats the best way out here?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 00:53:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288518#M162854</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-02-16T00:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Listing on all the field values of a transaction event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288519#M162855</link>
      <description>&lt;P&gt;Try to use &lt;CODE&gt;list&lt;/CODE&gt; instead of &lt;CODE&gt;values&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | stats count list(Message), list(Location) by somefield
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Feb 2018 01:18:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288519#M162855</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-16T01:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Listing on all the field values of a transaction event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288520#M162856</link>
      <description>&lt;P&gt;That is the expected behavior of transaction.  Your events have been combined into one event, and there are no longer duplicate values for each field.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 01:22:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288520#M162856</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-16T01:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Listing on all the field values of a transaction event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288521#M162857</link>
      <description>&lt;P&gt;If that is the case, then what would be taken as the field value . There are multiple fields with the same field name and multiple values. &lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 15:39:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288521#M162857</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-02-16T15:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Listing on all the field values of a transaction event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288522#M162858</link>
      <description>&lt;P&gt;The new event (which is made up of the original individual events) will have a field with multiple values.  The new field values will be all of the unique values from the original event field of the same name.&lt;/P&gt;

&lt;P&gt;So if you have the events:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;name=me location=work status=working
name=me location=home status=sleeping
name=me location=work status=eating
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My new event would look like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;name=me location=work,home status=working,sleeping,eating
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(with comma separated values represening multi-value fields)&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 15:45:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288522#M162858</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-16T15:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Listing on all the field values of a transaction event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288523#M162859</link>
      <description>&lt;P&gt;If your search is now concluding with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count values(Message),values(Location) by somefield
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;perhaps you should consider eliminating the &lt;CODE&gt;transaction&lt;/CODE&gt; call earlier in the search? There are usually other ways to achieve whatever you're trying to do with transaction (often using &lt;CODE&gt;eventstats&lt;/CODE&gt; or &lt;CODE&gt;streamstats&lt;/CODE&gt;), and in my experience these other approaches are usually more efficient and less prone to silent failure. If you would like help changing the structure of the overall command so that you can calculate these stats at the end, you could update the post or add a comment here with more details about the SPL that you're using and what your intended goals are.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 16:58:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288523#M162859</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-02-16T16:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Listing on all the field values of a transaction event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288524#M162860</link>
      <description>&lt;P&gt;This is my query, I am trying to get surrounding events when an error occurred in the logs, So i wrote the below query :&lt;/P&gt;

&lt;P&gt;index=servers sourcetype=json macaddress="*"&lt;BR /&gt;
| rename "bdy.msg" as Msg1,"bdy.ex.Msg" as Msg2, "appName" as App, "appVersion" as AppVers&lt;BR /&gt;
| eval AppName_Version= App + "_" + AppVers&lt;BR /&gt;
| transaction locId hostName macaddress endswith="Unhandled Exception" maxspan=60s&lt;BR /&gt;
| stats count as Cnt,list(AppName_Version) as AppName_Version,list(Msg1) as Msg1,list(Msg2) as Msg2 by locId hostName macaddress&lt;BR /&gt;
| sort -Cnt&lt;/P&gt;

&lt;P&gt;Let me know how streamstats and eventstats can be used here.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:04:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288524#M162860</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2020-09-29T18:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Listing on all the field values of a transaction event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288525#M162861</link>
      <description>&lt;P&gt;Thats where the problem is , I dont want to just find the unique values, I need all the values even if they are repeating. &lt;/P&gt;

&lt;P&gt;name=me, location=work,home,work status=working,sleeping,eating&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 18:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288525#M162861</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-02-16T18:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Listing on all the field values of a transaction event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288526#M162862</link>
      <description>&lt;P&gt;Ok, I'm going to riff off this post: &lt;A href="https://answers.splunk.com/answers/310019/as-part-of-a-splunk-alert-is-it-possible-to-includ.html"&gt;https://answers.splunk.com/answers/310019/as-part-of-a-splunk-alert-is-it-possible-to-includ.html&lt;/A&gt; by @rich7177&lt;/P&gt;

&lt;P&gt;So let's say the message "Unhandled Exception" occurs in a field called &lt;CODE&gt;status&lt;/CODE&gt;. I think this might work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=servers sourcetype=json macaddress="*"
| rename "bdy.msg" as Msg1,"bdy.ex.Msg" as Msg2, "appName" as App, "appVersion" as AppVers
| eval AppName_Version= App + "_" + AppVers, exception_message=if(status="Unhandled Exception", 1, NULL)
| streamstats last(exception_message) AS exception_present BY  locId hostName macaddress time_window=60s
| where isnotnull(exception_message) OR isnotnull(exception_present)
| stats count as Cnt,list(AppName_Version) as AppName_Version,list(Msg1) as Msg1,list(Msg2) as Msg2 by locId hostName macaddress
| sort -Cnt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm not 100% confident in this, but I think it's on the path to a solution.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 18:21:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288526#M162862</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-02-16T18:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Listing on all the field values of a transaction event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288527#M162863</link>
      <description>&lt;P&gt;Although it gives me some output, but i want to understand the logic here. Would you mind explaning that?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 23:20:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288527#M162863</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-03-01T23:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Listing on all the field values of a transaction event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288528#M162864</link>
      <description>&lt;P&gt;add mvlist&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 07:20:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Listing-on-all-the-field-values-of-a-transaction-event/m-p/288528#M162864</guid>
      <dc:creator>gmasca</dc:creator>
      <dc:date>2019-01-08T07:20:11Z</dc:date>
    </item>
  </channel>
</rss>

