<?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 Filter splunk results into a List in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Filter-splunk-results-into-a-List/m-p/575185#M200423</link>
    <description>&lt;P&gt;I have a Splunk query that parses the msg field, fetches the fields from the result and displays them in a table. PFA&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, the issue is, each field in the row has a unique time, but more than 1 row could have the same fields, except the time as shown in attached file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we enhance the query in a way, that if for more than 1 row, the fields are same except time, then we can have just row with those fields, and times can as be added as a list (separated by commas) to that final row.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example, if 2 rows are&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Value1, time1, Value2, Value3
Value1, time2, Value2, Value3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then it could be represented as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Value1, {time1, time2},  Value 2, Value3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would reduce the space the 2 (or more than 2) rows take on the Dashboard page.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the existing query:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myIndex "ERROR * ---" "taskExecutor-*" 
|  rex field=msg "^(?&amp;lt;Time&amp;gt;\S+\s+\S+)\s+\S+\s+(?&amp;lt;Error_Code&amp;gt;\d+)[^\]]+\]\s+(?&amp;lt;Service_Name&amp;gt;\S+)\s+:\s+(?&amp;lt;Error_Message&amp;gt;.+)"
| table Error_Message Error_Code Service_Name Time
| eventstats count as Count by Error_Message Error_Code Service_Name 
| sort -Count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Nov 2021 00:01:38 GMT</pubDate>
    <dc:creator>kirti_gupta12</dc:creator>
    <dc:date>2021-11-17T00:01:38Z</dc:date>
    <item>
      <title>Filter splunk results into a List</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-splunk-results-into-a-List/m-p/575185#M200423</link>
      <description>&lt;P&gt;I have a Splunk query that parses the msg field, fetches the fields from the result and displays them in a table. PFA&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, the issue is, each field in the row has a unique time, but more than 1 row could have the same fields, except the time as shown in attached file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we enhance the query in a way, that if for more than 1 row, the fields are same except time, then we can have just row with those fields, and times can as be added as a list (separated by commas) to that final row.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example, if 2 rows are&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Value1, time1, Value2, Value3
Value1, time2, Value2, Value3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then it could be represented as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Value1, {time1, time2},  Value 2, Value3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would reduce the space the 2 (or more than 2) rows take on the Dashboard page.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the existing query:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myIndex "ERROR * ---" "taskExecutor-*" 
|  rex field=msg "^(?&amp;lt;Time&amp;gt;\S+\s+\S+)\s+\S+\s+(?&amp;lt;Error_Code&amp;gt;\d+)[^\]]+\]\s+(?&amp;lt;Service_Name&amp;gt;\S+)\s+:\s+(?&amp;lt;Error_Message&amp;gt;.+)"
| table Error_Message Error_Code Service_Name Time
| eventstats count as Count by Error_Message Error_Code Service_Name 
| sort -Count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 00:01:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-splunk-results-into-a-List/m-p/575185#M200423</guid>
      <dc:creator>kirti_gupta12</dc:creator>
      <dc:date>2021-11-17T00:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Filter splunk results into a List</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-splunk-results-into-a-List/m-p/575195#M200430</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/35273"&gt;@kirti_gupta12&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You can try with values() function like below;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myIndex "ERROR * ---" "taskExecutor-*" 
|  rex field=msg "^(?&amp;lt;Time&amp;gt;\S+\s+\S+)\s+\S+\s+(?&amp;lt;Error_Code&amp;gt;\d+)[^\]]+\]\s+(?&amp;lt;Service_Name&amp;gt;\S+)\s+:\s+(?&amp;lt;Error_Message&amp;gt;.+)"
| table Error_Message Error_Code Service_Name Time
| stats count as Count values(Time) as Time by Error_Message Error_Code Service_Name 
| sort -Count&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 17 Nov 2021 04:30:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-splunk-results-into-a-List/m-p/575195#M200430</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-11-17T04:30:25Z</dc:date>
    </item>
  </channel>
</rss>

