<?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 expand multivalue fields after using streamstats command? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields-after-using-streamstats-command/m-p/324052#M174969</link>
    <description>&lt;P&gt;you'd want to use &lt;CODE&gt;|fillnull rcu_msg value="N/A"&lt;/CODE&gt; first, though, I believe for that blank row.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Apr 2017 12:06:19 GMT</pubDate>
    <dc:creator>cmerriman</dc:creator>
    <dc:date>2017-04-11T12:06:19Z</dc:date>
    <item>
      <title>How to expand multivalue fields after using streamstats command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields-after-using-streamstats-command/m-p/324049#M174966</link>
      <description>&lt;P&gt;Hello, I am trying to figure out how to expand multivalue fields after using the streamstats command.&lt;BR /&gt;
I have an event called "Set Range" that happens frequently and sometimes there is an error after this event happens. &lt;BR /&gt;
Occasionally there are multiple errors following a "Set Range" event.&lt;BR /&gt;
There is useful information that I want to extract from the "Set Range" event and correlate to the respective error(s).&lt;BR /&gt;
My search is below in &lt;EM&gt;ITALICS&lt;/EM&gt;:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;index="logs" process=beamCommonProcess &lt;BR /&gt;
"Transitioned to Error State" OR "SET_RANGE activity requested for beam supply point" OR "DISABLE_BEAM activity is complete" OR "ENABLE_BEAM activity requested" OR "beam allocated to" OR "beam deallocated from"&lt;BR /&gt;
| reverse&lt;BR /&gt;
| streamstats count(eval(searchmatch("SET_RANGE activity requested for beam supply point"))) AS SessionID&lt;BR /&gt;
| stats min(_time) AS _time count(eval(searchmatch("Transitioned to Error State"))) AS error_count count(eval(searchmatch("Beam allocated to"))) AS endbeam_count list(_raw) AS _raw BY SessionID&lt;BR /&gt;
| search error_count&amp;gt;0 &lt;BR /&gt;
| rex "RCU Error: .&lt;/EM&gt;?Submap: \d+\s*((?.&lt;EM&gt;?):"&lt;BR /&gt;
| eval output = if(output="Device","Device Overrange",output)&lt;BR /&gt;
| table _time SessionID rcu_msg&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;An example of the subsequent results is in the screenshot below (also attached):&lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/193212-resultsfromsearch.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;As you can see, in some cases there are multiple "rcu_msg" events for the same SessionID.&lt;BR /&gt;
What I want is to expand such message groups into individual line items.&lt;BR /&gt;
In other words, instead of 6 lines with some groups as shown in the screenshot, I want 9 individual lines each correlated to their respective SessionID. Thereafter I'm going to REX the useful information, but I can't do so until the multivalue fields are expanded.&lt;BR /&gt;
I tried mvexpand _raw but this did not do anything.&lt;/P&gt;

&lt;P&gt;PLEASE HELP!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:38:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields-after-using-streamstats-command/m-p/324049#M174966</guid>
      <dc:creator>like2splunk</dc:creator>
      <dc:date>2020-09-29T13:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to expand multivalue fields after using streamstats command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields-after-using-streamstats-command/m-p/324050#M174967</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;You need to use the mvexpand command, but using the rcu_msg field, example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | mvexpand rcu_msg | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 09:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields-after-using-streamstats-command/m-p/324050#M174967</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2017-04-11T09:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to expand multivalue fields after using streamstats command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields-after-using-streamstats-command/m-p/324051#M174968</link>
      <description>&lt;P&gt;@like2splunk... if you perform field extraction for rcu_msg ideally through &lt;STRONG&gt;Field Extraction Knowledge Object&lt;/STRONG&gt; or in your example using &lt;STRONG&gt;rex&lt;/STRONG&gt; command, you ca use the same in stats directly&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;Your Base Search&amp;gt;
|&amp;lt;Your rex command for rcu_msg&amp;gt;
| stats min(_time) AS _time count(eval(searchmatch("Transitioned to Error State"))) AS error_count count(eval(searchmatch("Beam allocated to"))) AS endbeam_count list(_raw) AS _raw BY SessionID, rcu_msg
| table _time SessionID rcu_msg
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Apr 2017 09:30:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields-after-using-streamstats-command/m-p/324051#M174968</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-04-11T09:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to expand multivalue fields after using streamstats command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields-after-using-streamstats-command/m-p/324052#M174969</link>
      <description>&lt;P&gt;you'd want to use &lt;CODE&gt;|fillnull rcu_msg value="N/A"&lt;/CODE&gt; first, though, I believe for that blank row.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 12:06:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-multivalue-fields-after-using-streamstats-command/m-p/324052#M174969</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-04-11T12:06:19Z</dc:date>
    </item>
  </channel>
</rss>

