<?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 group fields into a single line inside a multiline data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622456#M216374</link>
    <description>&lt;P&gt;the SPL is a mixture of your suggested but i just made a few modification (which is probably all wrong) lol&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| rex field="show chassis cluster status _ no_more" max_match=0 "(?s)Monitor-failures[\n][\n](?&amp;lt;Redundancy_group&amp;gt;.*)[\n][\n]"&lt;BR /&gt;| fields Redundancy_group&lt;BR /&gt;| rex "(?&amp;lt;group&amp;gt;Redundancy.*)"&lt;BR /&gt;| rex "(?&amp;lt;node&amp;gt;node.*)"&lt;BR /&gt;| filldown group&lt;BR /&gt;| where isnotnull(node)&lt;BR /&gt;| eval result=group . "," . group&lt;BR /&gt;|table group node result&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;desired result is still the original &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; desired result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Redundancy group: 0 , Failover count: 0,node0 200 primary no no None&lt;BR /&gt;Redundancy group: 0 , Failover count: 0,node1 2 secondary no no None&lt;BR /&gt;Redundancy group: 1 , Failover count: 0,node0 200 primary no no None&lt;BR /&gt;Redundancy group: 1 , Failover count: 0,node1 2 secondary no no None&lt;BR /&gt;Redundancy group: 2 , Failover count: 0,node0 200 primary no no None&lt;BR /&gt;Redundancy group: 2 , Failover count: 0,node1 2 secondary no no None&lt;/P&gt;</description>
    <pubDate>Tue, 29 Nov 2022 16:56:07 GMT</pubDate>
    <dc:creator>tha_ghost99</dc:creator>
    <dc:date>2022-11-29T16:56:07Z</dc:date>
    <item>
      <title>How to group fields into a single line inside a multiline data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622291#M216315</link>
      <description>&lt;P&gt;my subject may not be worded correctly &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; but i need some help.&lt;/P&gt;
&lt;P&gt;i have the below raw data, and i would like to group them together into its own line for reporting.&lt;/P&gt;
&lt;P&gt;Redundancy group: 0 , Failover count: 0&lt;BR /&gt;node0 200 primary no no None&lt;BR /&gt;node1 2 secondary no no None&lt;/P&gt;
&lt;P&gt;Redundancy group: 1 , Failover count: 0&lt;BR /&gt;node0 200 primary no no None&lt;BR /&gt;node1 20 secondary no no None&lt;/P&gt;
&lt;P&gt;Redundancy group: 2 , Failover count: 0&lt;BR /&gt;node0 200 primary no no None&lt;BR /&gt;node1 2 secondary no no None&lt;/P&gt;
&lt;P&gt;how can i have the output with the following:&lt;BR /&gt;would like to group them based on Redundancy Group # and Node #&lt;/P&gt;
&lt;P&gt;Redundancy group: 0 , Failover count: 0,node0 200 primary no no None&lt;BR /&gt;Redundancy group: 0 , Failover count: 0,node1 2 secondary no no None&lt;BR /&gt;Redundancy group: 1 , Failover count: 0,node0 200 primary no no None&lt;BR /&gt;Redundancy group: 1 , Failover count: 0,node1 2 secondary no no None&lt;BR /&gt;Redundancy group: 2 , Failover count: 0,node0 200 primary no no None&lt;BR /&gt;Redundancy group: 2 , Failover count: 0,node1 2 secondary no no None&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 17:35:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622291#M216315</guid>
      <dc:creator>tha_ghost99</dc:creator>
      <dc:date>2022-11-28T17:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to group fields into a single line inside a multiline data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622295#M216317</link>
      <description>&lt;P&gt;How would Splunk know to which Redundancy group any particular node belongs?&amp;nbsp; There appears to be nothing in a "node" event that connects it to a Redundancy group event.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 20:06:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622295#M216317</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-11-28T20:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to group fields into a single line inside a multiline data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622299#M216319</link>
      <description>&lt;P&gt;hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt; that is correct.&lt;/P&gt;&lt;P&gt;its basically just node0 and node1 because its below redundancy group0 for example.&lt;/P&gt;&lt;P&gt;so each redudancy group 1,2,3 has their own Node0 and Node1 output. would simply want to group them in 1 line.&lt;/P&gt;&lt;P&gt;hope it makes sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 19:01:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622299#M216319</guid>
      <dc:creator>tha_ghost99</dc:creator>
      <dc:date>2022-11-28T19:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to group fields into a single line inside a multiline data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622316#M216323</link>
      <description>&lt;P&gt;Here's a run-anywhere query that demonstrates an ugly way to accomplish it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval data="Redundancy group: 0 , Failover count: 0
node0 200 primary no no None
node1 2 secondary no no None
Redundancy group: 1 , Failover count: 0
node0 200 primary no no None
node1 20 secondary no no None
Redundancy group: 2 , Failover count: 0
node0 200 primary no no None
node1 2 secondary no no None" | eval data=split(data,"
") | mvexpand data | eval _raw=data | fields - data
```Above just sets up demo data.  Delete IRL```
```Extract events into fields```
| rex "(?&amp;lt;group&amp;gt;Redundancy.*)"
| rex "(?&amp;lt;node&amp;gt;node.*)"
```Populate empty group fields```
| filldown group
```Discard empty node fields```
| where isnotnull(node)
```Combine fields into one```
| eval result=group . "," . node
| table result&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 28 Nov 2022 21:44:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622316#M216323</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-11-28T21:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to group fields into a single line inside a multiline data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622356#M216330</link>
      <description>&lt;P&gt;When the consideration is merely presentation, I like to only use string and not be concerned about fields. &amp;nbsp;Here is my alternative. &amp;nbsp;Assuming that each redundancy group is its own event:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval data = split(_raw, "
")
| eval node = mvrange(1,3)
| eval data = mvmap(node, mvindex(data, 0) . "," . mvindex(data, node))
| mvexpand data&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If each event in raw data actually combines all redundancy groups with a blank line (it is critical to explain these details in the question), add another split and mvexpand on top.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval data = split(_raw, "

")
| mvexpand data
| eval data = split(data, "
")
| eval node = mvrange(1,3)
| eval data = mvmap(node, mvindex(data, 0) . "," . mvindex(data, node))
| mvexpand data&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Either way, you get&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;data&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Redundancy group: 0 , Failover count: 0,node0 200 primary no no None&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Redundancy group: 0 , Failover count: 0,node1 2 secondary no no None&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Redundancy group: 1 , Failover count: 0,node0 200 primary no no None&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Redundancy group: 1 , Failover count: 0,node1 20 secondary no no None&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Redundancy group: 2 , Failover count: 0,node0 200 primary no no None&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Redundancy group: 2 , Failover count: 0,node1 2 secondary no no None&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This is a run-anywhere code to verify (assuming raw event combines groups)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw = "Redundancy group: 0 , Failover count: 0
node0 200 primary no no None
node1 2 secondary no no None

Redundancy group: 1 , Failover count: 0
node0 200 primary no no None
node1 20 secondary no no None

Redundancy group: 2 , Failover count: 0
node0 200 primary no no None
node1 2 secondary no no None"
``` data emulation above, assuming combined group data ```
| eval data = split(_raw, "

")
| mvexpand data ``` split groups into own events ```
| eval data = split(data, "
") ``` take advantage of fixed line order ```
| eval node = mvrange(1,3)
| eval data = mvmap(node, mvindex(data, 0) . "," . mvindex(data, node)) ``` compose display lines ```
| mvexpand data ``` optional - make each line its own row ```
| fields - _* node&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 07:30:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622356#M216330</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-11-29T07:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to group fields into a single line inside a multiline data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622404#M216345</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i copy your code directly it works well, and is exactly what i want.&lt;/P&gt;&lt;P&gt;but when i use the actual data i got it working till the last '| eval result=group . "," . node'. it does not seem to provide any output as shown below in RESULT. .&lt;/P&gt;&lt;P&gt;im thinking maybe cause it has spaces in between the original one?&lt;/P&gt;&lt;P&gt;here is the output of the result.&lt;/P&gt;&lt;P&gt;splunk i think reformats and removes some of the tabs/spaces in between the original.&lt;/P&gt;&lt;P&gt;| rex field=Redundancy_group mode=sed "s/\n\n/\n/g"&lt;BR /&gt;| rex field=Redundancy_group max_match=0 "(?&amp;lt;group&amp;gt;Redundancy.*)"&lt;BR /&gt;| rex field=Redundancy_group max_match=0 "(?&amp;lt;node&amp;gt;node.*)"&lt;BR /&gt;| filldown group&lt;BR /&gt;| where isnotnull(node)&lt;BR /&gt;| eval result=group . "," . group&lt;BR /&gt;|table group node result&lt;/P&gt;&lt;P&gt;group node result&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class=""&gt;Redundancy group: 0 , Failover count: 0&lt;/DIV&gt;&lt;DIV class=""&gt;Redundancy group: 1 , Failover count: 2&lt;/DIV&gt;&lt;DIV class=""&gt;Redundancy group: 2 , Failover count: 2&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;node0 200 primary no no None&lt;/DIV&gt;&lt;DIV class=""&gt;node1 2 secondary no no None&lt;/DIV&gt;&lt;DIV class=""&gt;node0 200 primary no no None&lt;/DIV&gt;&lt;DIV class=""&gt;node1 20 secondary no no None&lt;/DIV&gt;&lt;DIV class=""&gt;node0 200 primary no no None&lt;/DIV&gt;&lt;DIV class=""&gt;node1 2 secondary no no None&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 29 Nov 2022 13:17:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622404#M216345</guid>
      <dc:creator>tha_ghost99</dc:creator>
      <dc:date>2022-11-29T13:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to group fields into a single line inside a multiline data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622406#M216347</link>
      <description>&lt;P&gt;The difference in our queries is yours is trying to work with multi-value fields.&amp;nbsp; MV fields don't behave the same as single-value fields, which is why you get different results.&lt;/P&gt;&lt;P&gt;Can you please provide a more realistic example of the data (sanitized, of course) so we can offer something that might work?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 13:55:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622406#M216347</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-11-29T13:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to group fields into a single line inside a multiline data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622419#M216357</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hi rich, im sorry, i tried to use exact code you gave and it didnt work, so i kinda tried some other stuff. as far as the data. it is what i sent. attach is the image.&lt;/P&gt;&lt;P&gt;but when i try to use yours which looks similar/identical to the one here its not. i am thinking its something to do with the formatting of splunk when i paste the output here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tha_ghost99_0-1669730053825.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/22694i495ECC65A34FED59/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tha_ghost99_0-1669730053825.png" alt="tha_ghost99_0-1669730053825.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 13:54:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622419#M216357</guid>
      <dc:creator>tha_ghost99</dc:creator>
      <dc:date>2022-11-29T13:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to group fields into a single line inside a multiline data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622426#M216361</link>
      <description>&lt;P&gt;I can't do anything with a screenshot other than see you have a lot of information in one multi-value field.&lt;/P&gt;&lt;P&gt;Let's step back and look at how this result was produced.&amp;nbsp; Perhaps if another approach is used we can get the desired result.&lt;/P&gt;&lt;P&gt;Please share the raw data, the current SPL, and the desired output.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 14:22:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622426#M216361</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-11-29T14:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to group fields into a single line inside a multiline data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622447#M216370</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here you go.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nov 27 13:36:45&lt;BR /&gt;Monitor Failure codes:&lt;BR /&gt;CS Cold Sync monitoring FL Fabric Connection monitoring&lt;BR /&gt;GR GRES monitoring HW Hardware monitoring&lt;BR /&gt;IF Interface monitoring IP IP monitoring&lt;BR /&gt;LB Loopback monitoring MB Mbuf monitoring&lt;BR /&gt;NH Nexthop monitoring NP NPC monitoring&lt;BR /&gt;SP SPU monitoring SM Schedule monitoring&lt;BR /&gt;CF Config Sync monitoring RE Relinquish monitoring&lt;BR /&gt;IS IRQ storm&lt;BR /&gt;&lt;BR /&gt;Cluster ID: 1&lt;BR /&gt;Node Priority Status Preempt Manual Monitor-failures&lt;/P&gt;&lt;P&gt;Redundancy group: 0 , Failover count: 0&lt;BR /&gt;node0 200 primary no no None&lt;BR /&gt;node1 2 secondary no no None&lt;/P&gt;&lt;P&gt;Redundancy group: 1 , Failover count: 2&lt;BR /&gt;node0 200 primary no no None&lt;BR /&gt;node1 20 secondary no no None&lt;/P&gt;&lt;P&gt;Redundancy group: 2 , Failover count: 2&lt;BR /&gt;node0 200 primary no no None&lt;BR /&gt;node1 2 secondary no no None&lt;/P&gt;&lt;P&gt;{primary:node0}&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 15:50:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622447#M216370</guid>
      <dc:creator>tha_ghost99</dc:creator>
      <dc:date>2022-11-29T15:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to group fields into a single line inside a multiline data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622454#M216373</link>
      <description>&lt;P&gt;What about the current SPL and the desired output?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 16:03:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622454#M216373</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-11-29T16:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to group fields into a single line inside a multiline data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622456#M216374</link>
      <description>&lt;P&gt;the SPL is a mixture of your suggested but i just made a few modification (which is probably all wrong) lol&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| rex field="show chassis cluster status _ no_more" max_match=0 "(?s)Monitor-failures[\n][\n](?&amp;lt;Redundancy_group&amp;gt;.*)[\n][\n]"&lt;BR /&gt;| fields Redundancy_group&lt;BR /&gt;| rex "(?&amp;lt;group&amp;gt;Redundancy.*)"&lt;BR /&gt;| rex "(?&amp;lt;node&amp;gt;node.*)"&lt;BR /&gt;| filldown group&lt;BR /&gt;| where isnotnull(node)&lt;BR /&gt;| eval result=group . "," . group&lt;BR /&gt;|table group node result&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;desired result is still the original &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; desired result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Redundancy group: 0 , Failover count: 0,node0 200 primary no no None&lt;BR /&gt;Redundancy group: 0 , Failover count: 0,node1 2 secondary no no None&lt;BR /&gt;Redundancy group: 1 , Failover count: 0,node0 200 primary no no None&lt;BR /&gt;Redundancy group: 1 , Failover count: 0,node1 2 secondary no no None&lt;BR /&gt;Redundancy group: 2 , Failover count: 0,node0 200 primary no no None&lt;BR /&gt;Redundancy group: 2 , Failover count: 0,node1 2 secondary no no None&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 16:56:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622456#M216374</guid>
      <dc:creator>tha_ghost99</dc:creator>
      <dc:date>2022-11-29T16:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to group fields into a single line inside a multiline data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622465#M216382</link>
      <description>&lt;P&gt;If you haven't extracted relevant segments into its own field, do it first. &amp;nbsp;Then manipulate strings.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval data = mvindex(split(_raw, "

"), 2, -2) ``` retrieve segments related to redundancy group ```
| mvexpand data ``` treat them as own events ```
| eval data = split(data, "
") ``` take advantage of fixed line order ```
| eval node = mvrange(1,3)
| eval data = mvmap(node, mvindex(data, 0) . "," . mvindex(data, node)) ``` compose display lines ```
| mvexpand data ``` optional - make each line its own row ```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Again, I used this for emulation:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw = "Nov 27 13:36:45
Monitor Failure codes:
CS Cold Sync monitoring FL Fabric Connection monitoring
GR GRES monitoring HW Hardware monitoring
IF Interface monitoring IP IP monitoring
LB Loopback monitoring MB Mbuf monitoring
NH Nexthop monitoring NP NPC monitoring
SP SPU monitoring SM Schedule monitoring
CF Config Sync monitoring RE Relinquish monitoring
IS IRQ storm

Cluster ID: 1
Node Priority Status Preempt Manual Monitor-failures

Redundancy group: 0 , Failover count: 0
node0 200 primary no no None
node1 2 secondary no no None

Redundancy group: 1 , Failover count: 2
node0 200 primary no no None
node1 20 secondary no no None

Redundancy group: 2 , Failover count: 2
node0 200 primary no no None
node1 2 secondary no no None

{primary:node0}"
| fields - _time
``` data emulation above= ```&lt;/LI-CODE&gt;&lt;P&gt;You can verify that the output is exactly what you prescribed when you combine this with the above.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 17:34:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-fields-into-a-single-line-inside-a-multiline-data/m-p/622465#M216382</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-11-29T17:34:37Z</dc:date>
    </item>
  </channel>
</rss>

