<?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: Need to combine the rows of a table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-the-rows-of-a-table/m-p/602237#M209626</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the query modification. However, when the Consumer_Count changes to 2 or more, it still shows 1 in the table.&lt;/P&gt;&lt;P&gt;For eg:&lt;/P&gt;&lt;P&gt;log1:&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;count&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;log2:&amp;nbsp;&lt;SPAN class=""&gt;gcg.gom.esb_159515.rg.APIMediation.Disp1.3.Rs&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;APIM3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;log3:&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;count&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;log4:&amp;nbsp;&lt;SPAN class=""&gt;gcg.gom.esb_159515.rg.APIMediation.Disp1.3.Rs&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;APIM2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;log5:&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;count&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;log6:&amp;nbsp;&lt;SPAN class=""&gt;gcg.gom.esb_159515.rg.APIMediation.Disp1.3.Rs&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;APIM1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;And query used is&amp;nbsp;&lt;SPAN&gt;*****&amp;nbsp;| rex field=_raw "Rs\.(?P&amp;lt;Queue&amp;gt;\w+)" | rex field=_raw "count\"\:(?P&amp;lt;Consumer_Count&amp;gt;\d+)\,"&amp;nbsp;| streamstats latest(Consumer_Count) as Consumer_Count | where isnotnull(Queue) | table Queue,Consumer_Count&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;It still gives the table as below:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" width="25.52016129032258%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Queue&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;Consumer_Count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;APIM3&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;APIM2&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;APIM1&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;while the expectation was:&lt;/P&gt;&lt;TABLE border="1" width="25.52016129032258%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Queue&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;Consumer_Count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;APIM3&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;APIM2&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;APIM1&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Please help to modify the query to get the table in the required manner.&lt;/P&gt;&lt;P&gt;Thank you..!!&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2022 11:25:21 GMT</pubDate>
    <dc:creator>Mrig342</dc:creator>
    <dc:date>2022-06-17T11:25:21Z</dc:date>
    <item>
      <title>How to combine the rows of a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-the-rows-of-a-table/m-p/602017#M209532</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I have logs like below in splunk.&lt;/P&gt;
&lt;P&gt;log1:&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;count&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:1,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;log2:&amp;nbsp;&lt;SPAN class=""&gt;gcg.gom.esb_159515.rg.APIMediation.Disp1.3.Rs&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;APIM3&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;log3:&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;count&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:1,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;log4:&amp;nbsp;&lt;SPAN class=""&gt;gcg.gom.esb_159515.rg.APIMediation.Disp1.3.Rs&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;APIM2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;log5:&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;count&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:1,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;log6:&amp;nbsp;&lt;SPAN class=""&gt;gcg.gom.esb_159515.rg.APIMediation.Disp1.3.Rs&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;APIM1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;I used the below query to create a table showing the "Queue" and the "Consumer count":&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;*****&amp;nbsp;| rex field=_raw "Rs\.(?P&amp;lt;Queue&amp;gt;\w+)" | rex field=_raw "count\"\:(?P&amp;lt;Consumer_Count&amp;gt;\d+)\," | table Queue,Consumer_Count&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;But this query gives the table in the below manner:&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;Queue&lt;/TD&gt;
&lt;TD width="50%"&gt;Consumer_Count&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;APIM3&lt;/TD&gt;
&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;APIM2&lt;/TD&gt;
&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;APIM1&lt;/TD&gt;
&lt;TD width="50%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;I want the rows to be combined in the below manner:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;Queue&lt;/TD&gt;
&lt;TD width="50%"&gt;Consumer_Count&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;APIM3&lt;/TD&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;APIM2&lt;/TD&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;APIM1&lt;/TD&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help to modify the query to get the desired output.&lt;/P&gt;
&lt;P&gt;Thank you..!!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 15:45:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-the-rows-of-a-table/m-p/602017#M209532</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2022-06-21T15:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need to combine the rows of a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-the-rows-of-a-table/m-p/602030#M209542</link>
      <description>&lt;LI-CODE lang="markup"&gt;| streamstats latest(Consumer_Count) as Consumer_Count
| where isnotnull(Queue)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Jun 2022 07:43:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-the-rows-of-a-table/m-p/602030#M209542</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-16T07:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need to combine the rows of a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-the-rows-of-a-table/m-p/602237#M209626</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the query modification. However, when the Consumer_Count changes to 2 or more, it still shows 1 in the table.&lt;/P&gt;&lt;P&gt;For eg:&lt;/P&gt;&lt;P&gt;log1:&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;count&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;log2:&amp;nbsp;&lt;SPAN class=""&gt;gcg.gom.esb_159515.rg.APIMediation.Disp1.3.Rs&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;APIM3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;log3:&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;count&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;log4:&amp;nbsp;&lt;SPAN class=""&gt;gcg.gom.esb_159515.rg.APIMediation.Disp1.3.Rs&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;APIM2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;log5:&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;count&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;log6:&amp;nbsp;&lt;SPAN class=""&gt;gcg.gom.esb_159515.rg.APIMediation.Disp1.3.Rs&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;APIM1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;And query used is&amp;nbsp;&lt;SPAN&gt;*****&amp;nbsp;| rex field=_raw "Rs\.(?P&amp;lt;Queue&amp;gt;\w+)" | rex field=_raw "count\"\:(?P&amp;lt;Consumer_Count&amp;gt;\d+)\,"&amp;nbsp;| streamstats latest(Consumer_Count) as Consumer_Count | where isnotnull(Queue) | table Queue,Consumer_Count&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;It still gives the table as below:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" width="25.52016129032258%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Queue&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;Consumer_Count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;APIM3&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;APIM2&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;APIM1&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;while the expectation was:&lt;/P&gt;&lt;TABLE border="1" width="25.52016129032258%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Queue&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;Consumer_Count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;APIM3&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;APIM2&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;APIM1&lt;/TD&gt;&lt;TD width="1.2903225806451601%"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Please help to modify the query to get the table in the required manner.&lt;/P&gt;&lt;P&gt;Thank you..!!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 11:25:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-the-rows-of-a-table/m-p/602237#M209626</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2022-06-17T11:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need to combine the rows of a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-the-rows-of-a-table/m-p/602239#M209627</link>
      <description>&lt;P&gt;It depends on the order of the events - try this way instead&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| streamstats last(Consumer_Count) as Consumer_Count
| where isnotnull(Queue)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 17 Jun 2022 11:30:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-the-rows-of-a-table/m-p/602239#M209627</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-17T11:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need to combine the rows of a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-the-rows-of-a-table/m-p/602346#M209656</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;This modification really works for my desired output.&lt;/P&gt;&lt;P&gt;Thank you so much for helping me always through your quick solutions.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jun 2022 17:22:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-the-rows-of-a-table/m-p/602346#M209656</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2022-06-19T17:22:57Z</dc:date>
    </item>
  </channel>
</rss>

